#!/usr/bin/env python
# -*- coding: utf-8 -*-


instr = input()
nq = instr.split(" ")

N = int(nq[0])
Q = int(nq[1])
balls = [chr(i) for i in range(65, 65+N)]

for i in range(N -1 ):
    for j in range(N - i  - 1):
        print("? %s %s"%(balls[j], balls[j + 1]), flush=True)
        ans = input()
        if(ans == ">") :
            balls[j + 1], balls[j] = balls[j], balls[j + 1]

print ("! %s"%"".join(balls), flush=True)
