n = int(input())

a = [1] * (n + 1)
cur = 1
cnt = 0
q = 30000

# 1 <= k <= 2
for i in range(2, n + 1):
    print('?', i - 1, i)
    res = int(input())
    if res == 2:
        a[i] = a[i - 1] % 2 + 1
    else:
        a[i] = a[i - 1]

"""for i in range(2, n + 1):
    print('?', 1, i)
    cnt += 1
    if cnt >= q: print(1 / 0)
    res = int(input())
    if res > cur:
        cur += 1
        a[i] = cur
    else:
        elem = cur
        s = [0] * (n + 1)
        s[elem] = 1
        a[i] = elem
        for j in range(i - 1, 0, -1):
            s[a[j]] += 1
            print('?', j, i)
            cnt += 1
            if cnt >= q: print(1 / 0)
            res = int(input())
            size = sum(i != 0 for i in s)
            if res == size:
                break
            if res > size:
                ...
            s[a[j]] = s[a[i]]
            s[a[i]] = 0
            a[i] = a[j]
        print(s, a)
"""
k = len(set(a))
print('Ready!')
print(k)
print(*a[1:])