import itertools def ucc(n): s = ["シイタ+ケヤマ=イキタイ","オオツカ+コクサイ=ビジツカン","spring+eight=picnic"][n-1] key = sorted(set([x for x in s if x not in "+="])) r = [x for x in range(10)][::1-(n==2)*2] p = itertools.permutations(r) for i in p: t = s for j,k in enumerate(key): t = t.replace(k,str(i[j])) if "0" not in [t[0],t[t.find("+")+1],t[t.find("=")+1]]: if eval(t.replace("=","==")): return t[t.find("=")+1:] print(ucc(int(input())))