#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, p = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - 48, c = getchar();
  return x * p;
}
namespace Mymath {
long long qp(long long x, long long p, long long mod) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = ans * x % mod;
    x = x * x % mod;
    p >>= 1;
  }
  return ans;
}
long long inv(long long x, long long mod) { return qp(x, mod - 2, mod); }
long long C(long long N, long long K, long long fact[], long long mod) {
  return fact[N] * inv(fact[K], mod) % mod * inv(fact[N - K], mod) % mod;
}
template <typename Tp>
Tp gcd(Tp A, Tp B) {
  if (B == 0) return A;
  return gcd(B, A % B);
}
template <typename Tp>
Tp lcm(Tp A, Tp B) {
  return A * B / gcd(A, B);
}
};  // namespace Mymath
const int Maxn = 250005;
int k, n, m, dep[Maxn], par[Maxn];
vector<int> G[Maxn], f[Maxn];
bool vis[Maxn];
vector<vector<int> > Cs;
void dfs(int x, int p) {
  vis[x] = true;
  par[x] = p;
  if ((dep[x] + 1) * k >= n) {
    printf("PATH\n");
    vector<int> ans;
    while (~x) ans.push_back(x), x = par[x];
    printf("%d\n", ans.size());
    for (auto v : ans) printf("%d ", v);
    printf("\n");
    exit(0);
  }
  bool flag = false;
  for (auto v : G[x]) {
    if (v == p) continue;
    if (!vis[v]) {
      dep[v] = dep[x] + 1;
      dfs(v, x);
      flag = true;
    } else {
      f[x].push_back(v);
    }
  }
  if (!flag) {
    int X = f[x][0], Y = f[x][1];
    if (dep[X] < dep[Y]) swap(X, Y);
    if ((dep[x] - dep[X]) % 3 != 2) {
      vector<int> tmp;
      tmp.push_back(x);
      while (1) {
        x = par[x];
        tmp.push_back(x);
        if (x == X) break;
      }
      Cs.push_back(tmp);
    } else if ((dep[x] - dep[Y]) % 3 != 2) {
      vector<int> tmp;
      tmp.push_back(x);
      while (1) {
        x = par[x];
        tmp.push_back(x);
        if (x == Y) break;
      }
      Cs.push_back(tmp);
    } else {
      vector<int> tmp;
      tmp.push_back(x);
      tmp.push_back(X);
      while (1) {
        X = par[X];
        tmp.push_back(X);
        if (X == Y) break;
      }
      Cs.push_back(tmp);
    }
    if (Cs.size() == k) {
      printf("CYCLES\n");
      for (int i = 0; i < Cs.size(); i++) {
        printf("%d\n", Cs[i].size());
        for (auto j : Cs[i]) {
          printf("%d ", j);
        }
        printf("\n");
      }
      exit(0);
    }
  }
}
int main() {
  n = read();
  m = read();
  k = read();
  for (int i = 0; i < m; i++) {
    int u = read(), v = read();
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, -1);
  return 0;
}
