#!/bin/python3 import sys #def initialize(s): # This function is called once before all queries. #def answerQuery(l, r): # Return the answer for this query modulo 1000000007. if __name__ == "__main__": s = input().strip() #initialize(s) q = int(input().strip()) for a0 in range(q): l, r = input().strip().split(' ') l, r = [int(l), int(r)] #result = answerQuery(l, r) print('2')