#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const long long INF = 1e9;
const long long LINF = INF * INF;
const int MAX = 1 << 18;
int n, m, k;
vector<int> g[MAX];
int depth[MAX];
int batya[MAX];
vector<int> synky[MAX];
vector<int> lifty[MAX];
char used[MAX];
void dfs(int v, int p = 0) {
  used[v] = 1;
  batya[v] = p;
  for (auto i : g[v]) {
    if (i == p) continue;
    if (used[i])
      lifty[v].push_back(i);
    else {
      depth[i] = depth[v] + 1;
      dfs(i, v);
      synky[v].push_back(i);
    }
  }
}
int cmp(int x, int y) { return depth[x] > depth[y]; }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k;
  int u, v;
  while (m--) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  depth[1] = 1;
  dfs(1);
  for (int i = (1); i < (n + 1); ++i)
    if (depth[i] >= (n + k - 1) / k) {
      cout << "PATH" << endl;
      vector<int> ans;
      while (i) {
        ans.push_back(i);
        i = batya[i];
      }
      cout << (int)((ans).size()) << endl;
      for (auto i : ans) cout << i << ' ';
      cout << endl;
      return 0;
    }
  cout << "CYCLES" << endl;
  int cnt = 0;
  for (int i = 1; i <= n && cnt < k; ++i) {
    if ((int)((synky[i]).size())) continue;
    cnt++;
    sort(lifty[i].begin(), lifty[i].end(), cmp);
    u = lifty[i][0];
    v = lifty[i][1];
    vector<int> ans;
    int lenu = -depth[u] + depth[i] + 1;
    int lenv = -depth[v] + depth[i] + 1;
    if (lenu % 3) {
      int x = i;
      while (x != u) {
        ans.push_back(x);
        x = batya[x];
      }
      ans.push_back(u);
    } else {
      if (lenv % 3) {
        int x = i;
        while (x != v) {
          ans.push_back(x);
          x = batya[x];
        }
        ans.push_back(v);
      } else {
        ans.push_back(i);
        int x = u;
        while (x != v) {
          ans.push_back(x);
          x = batya[x];
        }
        ans.push_back(v);
      }
    }
    cout << (int)((ans).size()) << endl;
    for (auto i : ans) cout << i << ' ';
    cout << endl;
  }
  cerr << "Time elapsed: " << clock() / (double)CLOCKS_PER_SEC << endl;
  return 0;
}
