#include <bits/stdc++.h>
using namespace std;
int MOD = 998244353;
int base = 29;
int MX = 1e9;
const int N = 250200;
int n, m, k;
vector<int> adj[N];
vector<int> adj2[N];
int tin[N];
int lev[N];
int tout[N];
int v[N];
int par[N];
int tree[N];
int up[30][N];
int logn = 25;
int timer;
void mst(int x) {
  tree[x] = 1;
  v[x] = 1;
  for (int i = 0; i < adj[x].size(); i++) {
    int nod = adj[x][i];
    if (!v[nod]) {
      adj2[nod].push_back(x);
      adj2[x].push_back(nod);
      mst(nod);
    }
  }
}
vector<int> leaves;
void dfs(int x, int p, int l) {
  tin[x] = ++timer;
  lev[x] = l;
  par[x] = p;
  up[0][x] = p;
  for (int i = 1; i <= logn; i++) {
    up[i][x] = up[i - 1][up[i - 1][x]];
  }
  int cnt = 0;
  for (int i = 0; i < adj2[x].size(); i++) {
    int nod = adj2[x][i];
    if (nod != p) {
      dfs(nod, x, l + 1);
      cnt++;
    }
  }
  if (cnt == 0) leaves.push_back(x);
  tout[x] = ++timer;
}
bool is_parent(int x, int y) {
  return (tin[x] <= tin[y] && tout[x] >= tout[y]);
}
int lca(int a, int b) {
  if (is_parent(a, b)) return a;
  if (is_parent(b, a)) return b;
  for (int i = logn; i >= 0; i--) {
    if (!is_parent(up[i][a], b)) {
      a = up[i][a];
    }
  }
  return up[0][a];
}
int d(int x, int y) {
  int lc = lca(x, y);
  return lev[x] + lev[y] - 2 * lev[lc];
}
void path(int x, int y, vector<int>& temp) {
  int lc = lca(x, y);
  while (x != lc) {
    temp.push_back(x);
    x = par[x];
  }
  temp.push_back(lc);
  vector<int> temp2;
  while (y != lc) {
    temp2.push_back(y);
    y = par[y];
  }
  reverse(temp2.begin(), temp2.end());
  for (int i = 0; i < temp2.size(); i++) temp.push_back(temp2[i]);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n >> m >> k;
  int u, v;
  for (int i = 1; i <= m; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  mst(1);
  dfs(1, 1, 1);
  int node, depth = 0;
  for (int i = 1; i <= n; i++) {
    if (lev[i] > depth) {
      depth = lev[i];
      node = i;
    }
  }
  if (depth >= n / k) {
    cout << "PATH\n";
    cout << depth << endl;
    while (node != 1) {
      cout << node << " ";
      node = par[node];
    }
    cout << "1\n";
  } else {
    cout << "CYCLES\n";
    for (int i = 0; i < k; i++) {
      int nod = leaves[i];
      int x = adj[nod][0];
      int y = adj[nod][1];
      int a = par[nod];
      if (a == x)
        x = adj[nod][2];
      else if (a == y)
        y = adj[nod][2];
      int d1 = d(x, y) + 2;
      int d2 = d(x, nod) + 1;
      int d3 = d(y, nod) + 1;
      vector<int> temp;
      temp.push_back(nod);
      if (d1 % 3 != 0) {
        path(x, y, temp);
      } else if (d2 % 3 != 0) {
        path(x, par[nod], temp);
      } else {
        path(y, par[nod], temp);
      }
      cout << temp.size() << endl;
      for (int i = 0; i < temp.size(); i++) cout << temp[i] << " ";
      cout << endl;
    }
  }
  return 0;
}
