#!/usr/bin/env python3
(i := 0, print("!", sum(bool(print("?", i, j)) != ("a" in input() and (i := j)) for j in range(1, int(input()) + 1))))
