package no092; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { @SuppressWarnings("unchecked") public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int k = sc.nextInt(); Graph g = new Graph(n); for(int i=0;i ans = new ArrayList<>(); for(int i=0;i 0) { System.out.print(" "); } System.out.print(ans.get(i)); } System.out.println(); } } class Graph { public static final int INF = 1<<29; int n; ArrayList[] graph; @SuppressWarnings("unchecked") public Graph(int n) { this.n = n; this.graph = new ArrayList[n]; for(int i=0;i(); } } public void addBidirectionalEdge(int from,int to,int cost) { addEdge(from,to,cost); addEdge(to,from,cost); } public void addEdge(int from,int to,int cost) { graph[from].add(new Edge(to, cost)); } class Edge { int to; int cost; public Edge(int to,int cost) { this.to = to; this.cost = cost; } } }