# Read the input lines until 0 is encountered import sys mapping = { 3: 'k', 4: 'i', 7: 'd', 8: 'e' } for line in sys.stdin: num = int(line.strip()) if num == 0: break if num in mapping: print(mapping[num]) else: # Handle numbers not in the mapping (though problem constraints may imply they are covered) print('?')