#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5e4 + 5;
int n, m, k, id, mxn, d[N], prv[N], tp[N], q[5], r;
vector<int> e[N], t[N], l;
bool v[N];
inline void dfs(int x, int fa) {
  d[x] = d[fa] + 1, v[x] = true;
  if (d[x] - 1 > mxn) id = x, mxn = d[x] - 1;
  bool f = false;
  for (unsigned int i = 0; i < e[x].size(); ++i)
    if (!v[e[x][i]])
      t[x].push_back(e[x][i]), t[e[x][i]].push_back(x),
          tp[e[x][i]] = x, dfs(e[x][i], x), f = true;
  if (!f) l.push_back(x);
}
inline void idfs(int x, int fa, int l) {
  if (l > mxn) {
    id = x, mxn = l;
    if (mxn - 1 >= n / k) {
      puts("PATH");
      printf("%d\n", mxn);
      for (int i = id; i; i = prv[i]) printf("%d ", i);
      exit(0);
    }
  }
  for (unsigned int i = 0; i < t[x].size(); ++i)
    if (t[x][i] != fa) prv[t[x][i]] = x, idfs(t[x][i], x, l + 1);
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  int u, v;
  for (int i = (1); i <= (m); ++i)
    scanf("%d%d", &u, &v), e[u].push_back(v), e[v].push_back(u);
  int st;
  dfs(1, 0), st = id, mxn = 0, idfs(st, 0, 1);
  puts("CYCLES");
  int c = 0;
  for (unsigned int i = 0; i < l.size(); ++i) {
    r = 0;
    int x = l[i];
    bool f = false;
    for (unsigned int j = 0; j < e[x].size(); ++j)
      if (d[e[x][j]] != d[x] - 1) {
        if (max((d[x] - d[e[x][j]] + 1) - 3, 0) % 3) {
          f = true, q[++r] = e[x][j];
          break;
        } else {
          q[++r] = e[x][j];
          if (r == 2) break;
        }
      }
    if (f) {
      int y = q[r];
      printf("%d\n", d[x] - d[y] + 1);
      for (int i = x; d[i] >= d[y]; i = tp[i]) printf("%d ", i);
      puts("");
    } else if (r == 2) {
      int y = q[1], z = q[2];
      if (d[y] < d[z]) swap(y, z);
      printf("%d\n", d[y] - d[z] + 2);
      printf("%d ", x);
      for (int i = y; d[i] >= d[z]; i = tp[i]) printf("%d ", i);
      puts("");
    }
    if (++c == k) break;
  }
  return 0;
}
