1104_E. Johnny Solving
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 
```python
import sys

s = sys.stdin.read()
inp = []
numb = 0
 
for i in range(len(s)):
    if s[i]>='0':
        numb = 10*numb + ord(s[i])-48
    else:
        inp.append(numb)
        numb = 0
if s[-1]>='0':
    inp.append(numb)

ii = 0
n = inp[ii]
ii+=1
m = inp[ii]
ii+=1
k = inp[ii]
ii+=1

coupl = [[] for _ in range(n)]
for _ in range(m):
    u = inp[ii]-1
    ii += 1
    v = inp[ii]-1
    ii += 1

    coupl[u].append(v)
    coupl[v].append(u)

P = [-1]*n
D = [1]*n
found = [False]*n

cycle_nodes = []

Q = [0]
while Q:
    node = Q.pop()
    if found[node]:
        continue
    found[node] = True
    found_any = False
    for nei in coupl[node]:
        if not found[nei]:
            P[nei] = node
            D[nei] = D[node]+1
            Q.append(nei)
            found_any = True
    if not found_any:
        cycle_nodes.append(node)

i = max(range(n),key=lambda i:D[i])
if k*D[i]>=n:
    print('PATH')
    print(D[i])
    out = []
    while i!=-1:
        out.append(i)
        i = P[i]
    print(' '.join(str(x+1) for x in out))
elif len(cycle_nodes)>=k:
    print('CYCLES')
    out = []
    for i in cycle_nodes[:k]:
        minD = min(D[nei] for nei in coupl[i] if (D[i] - D[nei] + 1)%3!=0) 
        tmp = []
        if minD == D[i]-1:
            a,b = [nei for nei in coupl[i] if (D[i] - D[nei] + 1)%3==0][:2]
            if D[a]<D[b]:
                a,b = b,a
            tmp.append(i)
            while a!=b:
                tmp.append(a)
                a = P[a]
            tmp.append(a)
        else:
            while D[i]!=minD:
                tmp.append(i)
                i = P[i]
            tmp.append(i)
        out.append(str(len(tmp)))
        out.append(' '.join(str(x+1) for x in tmp))
    print('\n'.join(out))
else:
    print(-1)
```