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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Andy Phan
 */
public class c implements Runnable {
    static int[] depth, height, par;
    static ArrayList<Integer> leaves, back[], edges[];
    public static void main(String[] args) throws InterruptedException {
        FS in = new FS(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int k = in.nextInt();
        int minLength = (n+k-1)/k;
        edges = new ArrayList[n];
        for(int i = 0; i < n; i++) edges[i] = new ArrayList<>();
        for(int i = 0; i < m; i++) {
            int u = in.nextInt()-1;
            int v = in.nextInt()-1;
            edges[u].add(v);
            edges[v].add(u);
        }

        depth = new int[n];
        back = new ArrayList[n];
        for(int i = 0; i < n; i++) back[i] = new ArrayList<>();
        depth[0] = 1;
        leaves = new ArrayList<>();
        height = new int[n];
        par = new int[n];
        
        Thread thread = new Thread(null, new c(), "lol", 1l<<28);
        thread.start();
        thread.join();
        if(height[0] >= minLength) {
            out.println("PATH");
            out.println(height[0]);
            int curr = 0;
            StringBuilder print = new StringBuilder();
            while(curr >= 0) {
                print.append(curr+1).append(" ");
                int max = -1;
                int max2 = -1;
                for(int e : edges[curr]) {
                    if(depth[e] <= depth[curr]) continue;
                    if(height[e] > max) {
                        max = height[e];
                        max2 = e;
                    }
                }
                curr = max2;
            }
            out.println(print);
        } else {
            out.println("CYCLES");
            for(int i = 0; i < k; i++) {
                StringBuilder print = new StringBuilder();
                int tmp = leaves.get(i);
                int x = back[tmp].get(0);
                int y = back[tmp].get(1);
                if(depth[x] < depth[y]) {
                    x ^= y;
                    y ^= x;
                    x ^= y;
                }
                if((depth[tmp]-depth[x]+1)%3 != 0) {
                    out.println(depth[tmp]-depth[x]+1);
                    int curr = tmp;
                    while(curr != x) {
                        print.append(curr+1).append(" ");
                        curr = par[curr];
                    }
                    print.append(x+1);
                } else if((depth[tmp]-depth[y]+1)%3 != 0) {
                    out.println(depth[tmp]-depth[y]+1);
                    int curr = tmp;
                    while(curr != y) {
                        print.append(curr+1).append(" ");
                        curr = par[curr];
                    }
                    print.append(y+1);
                } else {
                    out.println(depth[x]-depth[y]+2);
                    print.append(tmp+1);
                    int curr = x;
                    while(curr != y) {
                        print.append(curr+1).append(" ");
                        curr = par[curr];
                    }
                    print.append(y+1);
                }
                out.println(print);
            }
        }
        out.close();
    }

    @Override
    public void run() {
        dfs(0);
    }
    
    static void dfs(int node) {
        height[node] = 1;
        for(int e : edges[node]) {
            if(depth[e] != 0 && depth[e] == depth[node]-1) continue;
            if(depth[e] != 0) {
                back[node].add(e);
                continue;
            }
            depth[e] = depth[node]+1;
            par[e] = node;
            dfs(e);
            height[node] = Math.max(height[node], height[e]+1);
        }
        if(height[node] == 1) {
            leaves.add(node);
        }
    }
    
    static class FS {

        BufferedReader in;
        StringTokenizer token;
        
        public FS(InputStream str) {
            in = new BufferedReader(new InputStreamReader(str));
        }
        
        public String next() {
            if (token == null || !token.hasMoreElements()) {
                try {
                    token = new StringTokenizer(in.readLine());
                } catch (IOException ex) {
                }
                return next();
            }
            return token.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}
