#include <bits/stdc++.h>
using namespace std;
long long n, m, T, k, q;
const long long big = 1000000007;
const long long big2 = 998244353;
const long long MAXN = 300000;
vector<vector<long long> > C(MAXN, vector<long long>());
vector<vector<long long> > CB(MAXN, vector<long long>());
long long DEPTH[MAXN] = {0};
long long PAR[MAXN] = {0};
bool leaf[MAXN] = {0};
vector<long long> leaves;
bool mark[MAXN] = {0};
long long best = 0;
long long bd = 0;
void dfs(long long i, long long d) {
  DEPTH[i] = d;
  if (d > bd) {
    bd = d;
    best = i;
  }
  mark[i] = 1;
  leaf[i] = 1;
  for (int c1 = 0; c1 < (int)(C[i]).size(); c1++) {
    long long a = C[i][c1];
    if (!mark[a]) {
      leaf[i] = 0;
      PAR[a] = i;
      dfs(a, d + 1);
    } else {
      if (a != PAR[i]) CB[i].push_back(a);
    }
  }
  if (leaf[i]) leaves.push_back(i);
  return;
}
vector<vector<long long> > cyc;
vector<long long> cc;
void fix(long long i) {
  cc.clear();
  long long ai = CB[i][0];
  long long bi = CB[i][1];
  long long a = DEPTH[i] - DEPTH[ai];
  long long b = DEPTH[i] - DEPTH[bi];
  if (a > b) {
    swap(a, b);
    swap(ai, bi);
  }
  b = b - a;
  if ((a + 1) % 3 != 0) {
    cc.push_back(i);
    long long i2 = i;
    while (i2 != ai) {
      cc.push_back(PAR[i2]);
      i2 = PAR[i2];
    }
    cyc.push_back(cc);
    return;
  }
  if ((a + b + 1) % 3 != 0) {
    cc.push_back(i);
    long long i2 = i;
    while (i2 != bi) {
      cc.push_back(PAR[i2]);
      i2 = PAR[i2];
    }
    cyc.push_back(cc);
    return;
  }
  cc.push_back(i);
  cc.push_back(ai);
  long long i2 = ai;
  while (i2 != bi) {
    cc.push_back(PAR[i2]);
    i2 = PAR[i2];
  }
  cyc.push_back(cc);
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, e;
  cin >> n >> m >> k;
  for (int c1 = 0; c1 < m; c1++) {
    cin >> a >> b;
    a--;
    b--;
    C[a].push_back(b);
    C[b].push_back(a);
  }
  PAR[0] = -1;
  dfs(0, 0);
  if ((bd + 1) * k >= n) {
    cout << "PATH\n";
    cout << bd + 1 << "\n";
    a = best;
    while (a != -1) {
      cout << a + 1 << " ";
      a = PAR[a];
    }
    return 0;
  }
  cout << "CYCLES\n";
  for (int c1 = 0; c1 < k; c1++) {
    fix(leaves[c1]);
    cout << (int)(cyc[c1]).size() << "\n";
    for (int c2 = 0; c2 < (int)(cyc[c1]).size(); c2++) {
      cout << cyc[c1][c2] + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}

### Prompt

In Cpp, your task is to solve the following problem:

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 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long n, m, T, k, q;
const long long big = 1000000007;
const long long big2 = 998244353;
const long long MAXN = 300000;
vector<vector<long long> > C(MAXN, vector<long long>());
vector<vector<long long> > CB(MAXN, vector<long long>());
long long DEPTH[MAXN] = {0};
long long PAR[MAXN] = {0};
bool leaf[MAXN] = {0};
vector<long long> leaves;
bool mark[MAXN] = {0};
long long best = 0;
long long bd = 0;
void dfs(long long i, long long d) {
  DEPTH[i] = d;
  if (d > bd) {
    bd = d;
    best = i;
  }
  mark[i] = 1;
  leaf[i] = 1;
  for (int c1 = 0; c1 < (int)(C[i]).size(); c1++) {
    long long a = C[i][c1];
    if (!mark[a]) {
      leaf[i] = 0;
      PAR[a] = i;
      dfs(a, d + 1);
    } else {
      if (a != PAR[i]) CB[i].push_back(a);
    }
  }
  if (leaf[i]) leaves.push_back(i);
  return;
}
vector<vector<long long> > cyc;
vector<long long> cc;
void fix(long long i) {
  cc.clear();
  long long ai = CB[i][0];
  long long bi = CB[i][1];
  long long a = DEPTH[i] - DEPTH[ai];
  long long b = DEPTH[i] - DEPTH[bi];
  if (a > b) {
    swap(a, b);
    swap(ai, bi);
  }
  b = b - a;
  if ((a + 1) % 3 != 0) {
    cc.push_back(i);
    long long i2 = i;
    while (i2 != ai) {
      cc.push_back(PAR[i2]);
      i2 = PAR[i2];
    }
    cyc.push_back(cc);
    return;
  }
  if ((a + b + 1) % 3 != 0) {
    cc.push_back(i);
    long long i2 = i;
    while (i2 != bi) {
      cc.push_back(PAR[i2]);
      i2 = PAR[i2];
    }
    cyc.push_back(cc);
    return;
  }
  cc.push_back(i);
  cc.push_back(ai);
  long long i2 = ai;
  while (i2 != bi) {
    cc.push_back(PAR[i2]);
    i2 = PAR[i2];
  }
  cyc.push_back(cc);
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, e;
  cin >> n >> m >> k;
  for (int c1 = 0; c1 < m; c1++) {
    cin >> a >> b;
    a--;
    b--;
    C[a].push_back(b);
    C[b].push_back(a);
  }
  PAR[0] = -1;
  dfs(0, 0);
  if ((bd + 1) * k >= n) {
    cout << "PATH\n";
    cout << bd + 1 << "\n";
    a = best;
    while (a != -1) {
      cout << a + 1 << " ";
      a = PAR[a];
    }
    return 0;
  }
  cout << "CYCLES\n";
  for (int c1 = 0; c1 < k; c1++) {
    fix(leaves[c1]);
    cout << (int)(cyc[c1]).size() << "\n";
    for (int c2 = 0; c2 < (int)(cyc[c1]).size(); c2++) {
      cout << cyc[c1][c2] + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}

```