#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int n, m, k;
vector<int> adj[N];
int par[N], dep[N], isLeaf[N];
void dfs(int u, int pu = 0) {
  par[u] = pu;
  isLeaf[u] = true;
  for (int v : adj[u])
    if (par[v] == -1) {
      isLeaf[u] = false;
      dep[v] = dep[u] + 1;
      dfs(v, u);
    }
}
void trace(int v, int u) {
  if (v == u) {
    cout << v << '\n';
    return;
  }
  cout << v << ' ';
  trace(par[v], u);
}
int getDist(int u, int v) { return dep[u] - dep[v]; }
void findPath() {
  int lim = n / k + (n % k != 0);
  int maxDep = *max_element(dep + 1, dep + 1 + n) + 1;
  if (maxDep < lim) return;
  cout << "PATH" << '\n';
  cout << maxDep << '\n';
  for (int i = 1; i <= n; i++)
    if (dep[i] == maxDep - 1) {
      trace(i, 1);
      exit(0);
    }
}
void findCycle() {
  int numCycle = 0;
  cout << "CYCLES" << '\n';
  for (int u = 1; u <= n; u++) {
    if (numCycle == k) exit(0);
    if (!isLeaf[u]) continue;
    numCycle++;
    int x = -1, y = -1, lenCycle;
    for (int v : adj[u])
      if (v != par[u]) {
        if (x == -1)
          x = v;
        else if (y == -1)
          y = v;
      }
    lenCycle = getDist(u, x) + 1;
    if (lenCycle % 3 != 0) {
      cout << lenCycle << '\n';
      trace(u, x);
      continue;
    }
    lenCycle = getDist(u, y) + 1;
    if (lenCycle % 3 != 0) {
      cout << lenCycle << '\n';
      trace(u, y);
      continue;
    }
    if (dep[x] < dep[y]) swap(x, y);
    lenCycle = getDist(x, y) + 2;
    cout << lenCycle << '\n' << u << ' ';
    trace(x, y);
  }
}
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (fopen("main.in", "r")) freopen("main.in", "r", stdin);
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  memset(par, -1, sizeof par);
  dfs(1);
  findPath();
  findCycle();
  assert(false);
  return 0;
}
