import strutils,sequtils var N = stdin.readline.parseInt M = stdin.readline.parseInt P,Q : int A = newSeqWith(3,0) A[N - 1] = 1 for i in 0..