import java.util.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().run(); } void run() { int n = sc.nextInt(); int m = sc.nextInt(); // int[] arr = new int[n]; ArrayDeque deque = new ArrayDeque<>(); for (int i=0; i