#include <bits/stdc++.h>
using namespace std;
vector<int> G[300000];
vector<int> F[300000];
bool vis[300000];
int d[300000];
int f[300000];
int n, m, k;
vector<int> L;
void DFS(int u, int fa = 0) {
  vis[u] = true;
  f[u] = fa;
  if (d[u] >= (n + k - 1) / k - 1) {
    cout << "PATH" << endl;
    cout << (n + k - 1) / k << endl;
    while (u) {
      cout << u << " ";
      u = f[u];
    }
    exit(0);
  }
  int c = 0;
  for (int v : G[u])
    if (vis[v] == 0) {
      c += 1;
      d[v] = d[u] + 1;
      DFS(v, u);
    }
  if (c == 0) {
    L.push_back(u);
    for (int v : G[u])
      if (v != fa) {
        F[u].push_back(v);
      }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  while (m--) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  DFS(1);
  if (L.size() < k) {
    cout << -1;
    return 0;
  }
  cout << "CYCLES" << endl;
  for (int i = 0; i < k; i += 1) {
    int dd = L[i];
    sort(F[dd].begin(), F[dd].end(),
         [&](const int& a, const int& b) { return d[a] > d[b]; });
    if ((d[dd] - d[F[dd][0]]) % 3 != 2) {
      cout << d[dd] - d[F[dd][0]] + 1 << endl;
      int p = dd;
      while (p != F[dd][0]) {
        cout << p << " ";
        p = f[p];
      }
      cout << F[dd][0] << endl;
    } else if ((d[dd] - d[F[dd][1]]) % 3 != 2) {
      cout << d[dd] - d[F[dd][1]] + 1 << endl;
      int p = dd;
      while (p != F[dd][1]) {
        cout << p << " ";
        p = f[p];
      }
      cout << F[dd][1] << endl;
    } else {
      cout << d[F[dd][0]] - d[F[dd][1]] + 2 << endl;
      cout << dd << " ";
      int p = F[dd][0];
      while (p != F[dd][1]) {
        cout << p << " ";
        p = f[p];
      }
      cout << F[dd][1] << endl;
    }
  }
}
