#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
int const N = 3e5;
vvi g(N);
int dist[N];
int par[N];
int path;
vector<array<int, 3>> cycles;
vi get_path(int x, int y) {
  vi path({x});
  while (path.back() != y) path.push_back(par[path.back()]);
  return path;
}
void ppp(vi &path) {
  cout << path.size() << "\n";
  for (auto &i : path) cout << i << " ";
  cout << "\n";
}
void print_path(int x) {
  auto path = get_path(x, 1);
  cout << "PATH\n";
  ppp(path);
  exit(0);
}
void dfs(int x, int p, int d) {
  bool leaf = true;
  int u = -1, v = -1;
  dist[x] = d + 1;
  par[x] = p;
  for (auto &i : g[x]) {
    if (i == p) continue;
    if (not dist[i])
      leaf = false, dfs(i, x, d + 1);
    else if (u == -1)
      u = i;
    else if (v == -1)
      v = i;
  }
  if (dist[x] == path) print_path(x);
  if (leaf) {
    if (dist[u] < dist[v]) v = u ^ v, u = u ^ v, v = u ^ v;
    cycles.push_back({x, u, v});
  }
}
void print_cycles(int k) {
  cout << "CYCLES\n";
  for (int i = 0; i < k; ++i) {
    auto c = cycles[i];
    auto path = get_path(c[0], c[1]);
    if (path.size() % 3) {
      ppp(path);
      continue;
    }
    path = get_path(c[0], c[2]);
    if (path.size() % 3) {
      ppp(path);
      continue;
    }
    path = get_path(c[1], c[2]);
    cout << 1 + path.size() << "\n" << c[0] << " ";
    for (auto &i : path) cout << i << " ";
    cout << "\n";
  }
}
int main() {
  ios::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  path = (n + k - 1) / k;
  for (int i = 1; i <= m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v), g[v].push_back(u);
  }
  dfs(1, 0, 0);
  print_cycles(k);
  return 0;
}
