#include <bits/stdc++.h>
using namespace std;
const int maxn = 251234;
bool path;
int n, k, m, dep[maxn], f[maxn], lim;
vector<int> G[maxn], back[maxn], leaves;
void dfs(int u, int p) {
  bool lv = true;
  f[u] = p;
  dep[u] = dep[p] + 1;
  if (dep[u] >= lim) {
    path = true;
    puts("PATH");
    printf("%d\n", dep[u]);
    printf("%d ", u);
    return;
  }
  for (int v : G[u]) {
    if (dep[v]) {
      if (v != p) back[u].emplace_back(v);
      continue;
    }
    lv = false;
    dfs(v, u);
    if (path) {
      printf("%d ", u);
      return;
    }
  }
  if (lv) leaves.emplace_back(u);
}
bool check(int lv, int par) {
  if ((dep[lv] - dep[par] + 1) % 3 == 0) return false;
  printf("%d\n", dep[lv] - dep[par] + 1);
  for (int u = lv; u != par; u = f[u]) printf("%d ", u);
  printf("%d\n", par);
  return true;
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  lim = n / k + (n % k > 0);
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }
  dfs(1, 0);
  if (path) return 0;
  puts("CYCLES");
  assert(leaves.size() >= k);
  for (int(i) = (0); (i) <= ((k)-1); (i)++) {
    int u = leaves[i];
    assert(back[u].size() >= 2);
    int p = back[u][0], q = back[u][1];
    if (dep[p] > dep[q]) swap(p, q);
    if (check(u, p)) continue;
    if (check(u, q)) continue;
    printf("%d\n", dep[q] - dep[p] + 2);
    printf("%d ", u);
    for (int v = q; v != p; v = f[v]) printf("%d ", v);
    printf("%d\n", p);
  }
}
