#include <bits/stdc++.h>
using namespace std;
const int N = 250005, M = 500005;
int n, m, K, edgenum, head[N], Next[M * 2], vet[M * 2], dep[N], fa[N];
bool vis[N];
vector<int> leaf;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
void add(int u, int v) {
  edgenum++;
  Next[edgenum] = head[u];
  vet[edgenum] = v;
  head[u] = edgenum;
}
void dfs(int u, int father, int d) {
  fa[u] = father;
  dep[u] = d;
  vis[u] = 1;
  if (d >= (n + K - 1) / K) {
    puts("PATH");
    printf("%d\n", d);
    for (int i = u; i; i = fa[i]) printf("%d ", i);
    puts("");
    exit(0);
  }
  int flag = 0;
  for (int e = head[u]; e; e = Next[e]) {
    int v = vet[e];
    if (vis[v]) continue;
    dfs(v, u, d + 1);
    flag = 1;
  }
  if (!flag) leaf.push_back(u);
}
bool cmp(int x, int y) { return dep[x] < dep[y]; }
int main() {
  n = read(), m = read(), K = read();
  for (int i = 1; i <= m; i++) {
    int u = read(), v = read();
    add(u, v);
    add(v, u);
  }
  dfs(1, 0, 1);
  puts("CYCLES");
  for (int i = 0; i < K; i++) {
    int u = leaf[i], flag = 0;
    vector<int> tmp;
    for (int e = head[u]; e; e = Next[e]) {
      int v = vet[e];
      if (tmp.size() != 2) tmp.push_back(v);
      if (v == fa[u] || (dep[u] - dep[v] + 1) % 3 == 0) continue;
      printf("%d\n", dep[u] - dep[v] + 1);
      for (int j = u; j != fa[v]; j = fa[j]) printf("%d ", j);
      puts("");
      flag = 1;
      break;
    }
    if (!flag) {
      sort(tmp.begin(), tmp.end(), cmp);
      printf("%d\n", dep[tmp[1]] - dep[tmp[0]] + 2);
      int x = tmp[0], y = tmp[1];
      while (fa[x] != fa[y]) {
        printf("%d ", y);
        y = fa[y];
      }
      printf("%d %d\n", y, u);
    }
  }
  return 0;
}
