import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().solve(); } void solve() { FastScanner sc=new FastScanner(); int N=sc.nextInt(); boolean[] ok=new boolean[N]; PrintWriter pw=new PrintWriter(System.out); for (int i=0;i list=new ArrayList<>(); for (int i=0;i