729 B | 729 chars
import sys
from math import sqrt, pi, sin, factorial, ceil, floor
from datetime import datetime, timedelta
BLANK = " "
#inp = input
inp = lambda : sys.stdin.readline()[:-1].strip()
mii = lambda x = BLANK : [*map(int,inp().split(x))]
mfi = lambda x = BLANK : [*map(float,inp().split(x))]
ii = lambda : int(inp())
fi = lambda : float(inp())
p = print
def solve():
while 1:
s = sys.stdin.readline().rstrip()
if s == 'I quacked the code!':
break
if s == "":
continue
if s[-1] == '.':
sys.stdout.write("*Nod*\n")
elif s[-1] == '?':
sys.stdout.write("Quack!\n")
sys.stdout.flush()
if __name__ == "__main__":
tc = 1
for t in range(1, tc+1):
ret = solve()