Today is tuesday, that means there is a dispute in JOHNNY SOLVING team again: they try to understand who is Johnny and who is Solving. That's why guys asked Umnik to help them. Umnik gave guys a connected graph with n vertices without loops and multiedges, such that a degree of any vertex is at least 3, and also he gave a number 1 ≤ k ≤ n. Because Johnny is not too smart, he promised to find a simple path with length at least n/k in the graph. In reply, Solving promised to find k simple by vertices cycles with representatives, such that: 

  * Length of each cycle is at least 3. 
  * Length of each cycle is not divisible by 3. 
  * In each cycle must be a representative - vertex, which belongs only to this cycle among all printed cycles. 



You need to help guys resolve the dispute, for that you need to find a solution for Johnny: a simple path with length at least n/k (n is not necessarily divided by k), or solution for Solving: k cycles that satisfy all the conditions above. If there is no any solution - print -1. 

Input

The first line contains three integers n, m and k (1 ≤ k ≤ n ≤ 2.5 ⋅ 10^5, 1 ≤ m ≤ 5 ⋅ 10^5)

Next m lines describe edges of the graph in format v, u (1 ≤ v, u ≤ n). It's guaranteed that v ≠ u and all m pairs are distinct.

It's guaranteed that a degree of each vertex is at least 3.

Output

Print PATH in the first line, if you solve problem for Johnny. In the second line print the number of vertices in the path c (c ≥ n/k). And in the third line print vertices describing the path in route order.

Print CYCLES in the first line, if you solve problem for Solving. In the following lines describe exactly k cycles in the following format: in the first line print the size of the cycle c (c ≥ 3). In the second line print the cycle in route order. Also, the first vertex in the cycle must be a representative.

Print -1 if there is no any solution. The total amount of printed numbers in the output must be at most 10^6. It's guaranteed, that if exists any solution then there is a correct output satisfies this restriction.

Examples

Input


4 6 2
1 2
1 3
1 4
2 3
2 4
3 4


Output


PATH
4
1 2 3 4 

Input


10 18 2
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
2 3
3 4
2 4
5 6
6 7
5 7
8 9
9 10
8 10


Output


CYCLES
4
4 1 2 3 
4
7 1 5 6 
import java.io.*;
import java.util.*;

public class A {
	public static void main (String[] args) { new A(); }

	int[][] adj;
	int[][] lift;
	int[] depth;
	boolean[] leaf;
	int LCA1 = -1, LCA2 = -1, ptr = 0;

	int[] print1;
	int[] reverse1;
	
	public A() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int n = fs.nextInt(), m = fs.nextInt(), k = fs.nextInt();
		int maxlog = Integer.numberOfTrailingZeros(Integer.highestOneBit(n))+1;
		int[] deg = new int[n];
		int[][] edges = new int[m][2];
		for(int i = 0; i < m; i++) {
			int u = fs.nextInt()-1, v = fs.nextInt()-1;
			edges[i][0] = u; edges[i][1] = v;
			deg[u]++; deg[v]++;
		}
		adj = new int[n][];
		for(int i = 0; i < n; i++) {
			adj[i] = new int[deg[i]];
			deg[i] = 0;
		}
		for(int i = 0; i < m; i++) {
			int u = edges[i][0];
			int v = edges[i][1];
			adj[u][deg[u]++] = v;
			adj[v][deg[v]++] = u;
		}
		
		depth = new int[n];
		lift = new int[maxlog][n];
		for(int[] e : lift) Arrays.fill(e, -1);
		
		leaf = new boolean[n];
		Arrays.fill(leaf, true);
		dfs(0);
		
		int max = 0;
		for(int i : depth) max = Math.max(max, i);
		
		int req = n/k + (n%k > 0 ? 1 : 0);
		if(max >= req) {
			int who = -1;
			for(int i = 0; i < n; i++) {
				if(depth[i] == max) {
					who = i;
				}
			}
			
			int[] res = new int[max];
			int ptr = 0;
			while(ptr < max) {
				res[ptr++] = who;
				who = lift[0][who];
			}
			
			out.println("PATH");
			out.println(max);
			for(int i : res) out.print(1+i + " ");
			out.println();
			out.close();
			return;
		}
	
		for(int lg = 1; lg < maxlog; lg++) {
			for(int i = 0; i < n; i++) {
				int up = lift[lg-1][i];
				if(up == -1 || lift[lg-1][up] == -1) continue;
				lift[lg][i] = lift[lg-1][up];
			}
		}
		
		out.println("CYCLES");
		int numCycles = 0;

		print1 = new int[n];
		reverse1 = new int[n];
		
		for(int i = 0; i < n && numCycles < k; i++) {
			if(!leaf[i]) continue;
			
			int p1 = -1, p2 = -1;
			for(int v : adj[i]) {
				if(v == lift[0][i]) continue;
				if(p1 == -1) p1 = v;
				else if(p2 == -1) {
					p2 = v;
					break;
				}
			}
			
			int d1 = dist(i, p1);
			int d2 = dist(p1, p2);
			
			int path1 = (1+d1)%3;
			int path2 = (1+d2+d1)%3;
			int path3 = (2+d2)%3;
			
			if(path1 != 0) {
				ptr = 0;
				getPath(i, p1, lca(i, p1));
			}
			else if(path2 != 0) {
				ptr = 0;
				getPath(i, p2, lca(i, p2));
			}
			else if(path3 != 0) {
				print1[0] = i;
				ptr = 1;
				getPath(p1, p2, lca(p1, p2));
			}
			else throw null;
			
			out.println(ptr);
			for(int j = 0; j < ptr; j++) {
				out.print(1+print1[j] + " ");
			}
			out.println();
			
			numCycles++;
		}
		
		out.close();
	}
	
	void getPath(int u, int v, int lca) {
		int cur = u;
		while(true) {
			print1[ptr++] = cur;
			if(cur == lca) break;
			cur = lift[0][cur];
		}
	
		cur = v;
		int ptr2 = 0;
		while(cur != lca) {
			reverse1[ptr2++] = cur;
			cur = lift[0][cur];
		}

		for(int j = ptr2-1; j >= 0; j--)
			print1[ptr++] = reverse1[j];
	}
	
	int dist(int u, int v) {
		int L = lca(u, v);
		if(LCA1 == -1) LCA1 = L;
		else LCA2 = L;
		return depth[u]+depth[v]-2*depth[L];
	}
	
	int lca(int u, int v) {
		if(depth[v] > depth[u]) return lca(v, u);
		int diff = depth[u]-depth[v];
		while(diff > 0) {
			int b = Integer.lowestOneBit(diff);
			int lg = Integer.numberOfTrailingZeros(b);
			u = lift[lg][u];
			diff -= b;
		}
		if(u == v) return u;
		
		for(int lg = lift.length-1; lg >= 0; lg--) {
			if(lift[0][v] != lift[0][u]) {
				u = lift[0][u];
				v = lift[0][v];
			}
		}
		
		return lift[0][v];
	}
	
	void dfs(int u) {
		for(int v : adj[u]) {
			if(lift[0][v] != -1) continue;
			leaf[u] = false;
			lift[0][v] = u;
			depth[v] = 1+depth[u];
			dfs(v);
		}
	}
	
	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}