while 1:a=raw_input().split();print[" ".join([c," "][c in a]for c in"123456D")+"o it!!","POOR"][a>sorted(a)]