#include <bits/stdc++.h>
using namespace std;
const int MaxN = 250100;
const int Mod = 1e9 + 7;
int N, M, K;
int dep[MaxN];
int parent[MaxN];
vector<int> backedge[MaxN];
bool leaf[MaxN];
bool been[MaxN];
vector<int> adj[MaxN];
void dfs(int node, int par) {
  if (par != -1) {
    dep[node] = dep[par] + 1;
    parent[node] = par;
  }
  been[node] = 1;
  for (auto v : adj[node]) {
    if (been[v]) {
      if (v != par) {
        backedge[node].push_back(v);
      }
    } else {
      leaf[node] = 0;
      dfs(v, node);
    }
  }
}
int cceil(int a, int b) { return (a + b - 1) / b; }
void Dzeki(int node) {
  vector<int> output;
  while (parent[node] != -1) {
    output.push_back(node);
    node = parent[node];
  }
  output.push_back(0);
  cout << "PATH" << endl;
  assert((int)output.size() >= cceil(N, K));
  cout << output.size() << endl;
  for (auto x : output) cout << x + 1 << " ";
  cout << endl;
  exit(0);
}
bool ok(int node, int x) { return ((dep[node] - dep[x] + 1) % 3 != 0); }
void simpleCycle(int node, int x) {
  vector<int> output;
  while (node != x) {
    output.push_back(node);
    node = parent[node];
  }
  output.push_back(x);
  assert((int)output.size() % 3 != 0);
  assert((int)output.size() > 3);
  cout << output.size() << endl;
  for (auto v : output) {
    cout << v + 1 << " ";
  }
  cout << endl;
}
void weirdCycle(int node, int y, int x) {
  vector<int> output;
  output.push_back(node);
  while (y != x) {
    output.push_back(y);
    y = parent[y];
  }
  output.push_back(x);
  assert((int)output.size() % 3 != 0);
  assert((int)output.size() > 3);
  cout << output.size() << endl;
  for (auto v : output) {
    cout << v + 1 << " ";
  }
  cout << endl;
}
void Cycle(int node) {
  assert((int)backedge[node].size() >= 2);
  int x = backedge[node][0];
  int y = backedge[node][1];
  if (dep[x] > dep[y]) swap(x, y);
  if (ok(node, x)) {
    simpleCycle(node, x);
  } else if (ok(node, y)) {
    simpleCycle(node, y);
  } else {
    weirdCycle(node, y, x);
  }
}
void solve() {
  for (int i = (0); i < (N); i++) {
    leaf[i] = 1;
  }
  dep[0] = 1;
  parent[0] = -1;
  dfs(0, -1);
  for (int i = (0); i < (N); i++) {
    if (dep[i] >= cceil(N, K)) {
      Dzeki(i);
    }
  }
  int cnt = 0;
  for (int i = (0); i < (N); i++) {
    if (leaf[i]) {
      cnt++;
    }
  }
  if (cnt < K) {
    cout << -1 << endl;
    exit(0);
  }
  int kant = 0;
  cout << "CYCLES" << endl;
  for (int i = (0); i < (N); i++) {
    if (leaf[i]) {
      assert(dep[i] >= 3);
      Cycle(i);
      kant++;
      if (kant >= K) exit(0);
    }
  }
}
void load() {
  assert(cceil(5, 3) == 2);
  assert(cceil(5, 2) == 3);
  assert(cceil(6, 3) == 2);
  cin >> N >> M >> K;
  for (int i = (0); i < (M); i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  load();
  solve();
  return 0;
}
