Compiler problem

When I am executing a python code in Pycharm it shows the correct output which I have been expected for as output but when I am executing the same code in coding blocks compiler, it shows the different output.

Please share the code

inp = []
t = “abcdefghijklmnopqrstuvwxyz”
d = dict()
for i in t:
d[i] = []
for _ in range(int(input())):
s = input()
grab = s[0]
if grab not in d:
d[grab].append([len(s), s])
else:
d[grab].append([len(s), s])
for k, v in d.items():
v.sort(reverse=True)
for k, v in d.items():
if len(v):
if len(v) == 1:
print(v[0][1])
else:
for i in v:
print(i[1])

Bro This code is giving erros when i am running it in visual studio code.