publicclassBOJ10813{ publicstaticvoidmain(String[] args)throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(bf.readLine()," "); int N = Integer.parseInt(st.nextToken()); int M = Integer.parseInt(st.nextToken()); int[] arr = newint[N+1];
for(int i=1;i<=N;i++) arr[i]=i;
for(int k=0;k<M;k++){ st = new StringTokenizer(bf.readLine()," "); int i = Integer.parseInt(st.nextToken()); int j = Integer.parseInt(st.nextToken());