#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 18;
vector<int> adj[maxn], sons[maxn];
bool vis[maxn];
int fa[maxn], dep[maxn], depth, leaf, n, m, k;
vector<vector<int>> cycles;
void dfs(int u, int d) {
  vis[u] = true;
  if ((dep[u] = d) > depth) depth = d, leaf = u;
  for (auto v : adj[u])
    if (!vis[v]) {
      fa[v] = u;
      dfs(v, d + 1);
      if (depth > (n - 1) / k) return;
      sons[u].push_back(v);
    }
  if (sons[u].empty() && cycles.size() ^ k) {
    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);
      return;
    }
    loop = vector<int>(1, u);
    while (loop.back() ^ y) loop.push_back(fa[loop.back()]);
    if (loop.size() % 3) {
      cycles.push_back(loop);
      return;
    }
    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);
  }
}
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);
  if (depth > (n - 1) / k) {
    cout << "PATH\n" << depth << '\n';
    while (true) {
      cout << leaf;
      if (fa[leaf]) {
        cout << ' ';
        leaf = fa[leaf];
      } else {
        cout << '\n';
        break;
      }
    }
  } else {
    cout << "CYCLES\n";
    for (int i = 0; i ^ k; ++i) {
      cout << cycles[i].size() << '\n' << cycles[i].front();
      for (int j = 1; j ^ cycles[i].size(); ++j) cout << ' ' << cycles[i][j];
      cout << '\n';
    }
  }
}
