#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 18;
vector<int> adj[maxn];
bool vis[maxn];
int fa[maxn], dep[maxn], n, m, k;
vector<vector<int>> cycles;
void dfs(int u, int d) {
  vis[u] = true;
  if ((dep[u] = d) > (n - 1) / k) {
    cout << "PATH\n" << d << '\n' << u;
    for (int i = fa[u]; i; i = fa[i]) cout << ' ' << i;
    cout << '\n';
    exit(0);
  }
  bool flag = true;
  for (auto v : adj[u])
    if (!vis[v]) {
      fa[v] = u;
      dfs(v, d + 1);
      flag = false;
    }
  while (flag) {
    int index = 0;
    if (adj[u][index] == fa[u]) ++index;
    int x = adj[u][index++];
    if (adj[u][index] == fa[u]) ++index;
    int y = adj[u][index];
    vector<int> loop(1, u);
    while (loop.back() ^ x) loop.push_back(fa[loop.back()]);
    if (loop.size() % 3) {
      cycles.push_back(loop);
      break;
    }
    loop = vector<int>(1, u);
    while (loop.back() ^ y) loop.push_back(fa[loop.back()]);
    if (loop.size() % 3) {
      cycles.push_back(loop);
      break;
    }
    loop = vector<int>(1, u);
    if (dep[x] < dep[y]) swap(x, y);
    loop.push_back(x);
    while (loop.back() ^ y) loop.push_back(fa[loop.back()]);
    cycles.push_back(loop);
    break;
  }
  if (cycles.size() == k) {
    cout << "CYCLES\n";
    for (auto& loop : cycles) {
      cout << loop.size() << '\n' << loop.front();
      for (int i = 1; i ^ loop.size(); ++i) cout << ' ' << loop[i];
      cout << '\n';
    }
    exit(0);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> m >> k;
  while (m--) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, 1);
}
