import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;

public class supreme_ak {

    void solve() throws IOException {
        int n = in.nextInt();
        int m = in.nextInt();
        int[][] c = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                c[i][j] = in.nextInt();
            }
        }

        HashSet<Integer> colors = new HashSet<Integer>();
        for (int i = 0; i < n; i++) {
            HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();
            for (int j = 0; j < m; j++) {
                int cc = c[i][j];
                if (!count.containsKey(cc)) {
                    count.put(cc, 1);
                } else {
                    count.put(cc, count.get(cc) + 1);
                }
                if (count.get(cc) > m / 2) {
                    colors.add(cc);
                }
            }
        }
        for (int j = 0; j < m; j++) {
            HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();
            for (int i = 0; i < n; i++) {
                int cc = c[i][j];
                if (!count.containsKey(cc)) {
                    count.put(cc, 1);
                } else {
                    count.put(cc, count.get(cc) + 1);
                }
                if (count.get(cc) > n / 2) {
                    colors.add(cc);
                }
            }
        }

        for (int color : colors) {
            int[] gR = new int[n];
            int[] gC = new int[m];
            int[][] tmpC = new int[n][];
            for (int i = 0; i < n; i++) {
                tmpC[i] = c[i].clone();
            }
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    if (tmpC[i][j] == color) {
                        gR[i]++;
                        gC[j]++;
                    }
                }
            }
            ArrayList<Integer> ans = new ArrayList<Integer>();
            boolean changes = true;
            while (changes) {
                changes = false;
                for (int i = 0; i < n; i++) {
                    if (m / 2 < gR[i] && gR[i] < m) {
                        ans.add(i + 1);
                        changes = true;
                        for (int j = 0; j < m; j++) {
                            if (tmpC[i][j] != color) {
                                tmpC[i][j] = color;
                                gC[j]++;
                                gR[i]++;
                            }
                        }
                    }
                }
                for (int j = 0; j < m; j++) {
                    if (n / 2 < gC[j] && gC[j] < n) {
                        ans.add(-(j + 1));
                        changes = true;
                        for (int i = 0; i < n; i++) {
                            if (tmpC[i][j] != color) {
                                tmpC[i][j] = color;
                                gC[j]++;
                                gR[i]++;
                            }
                        }
                    }
                }
            }

            boolean all = true;
            for (int i = 0; i < n; i++) {
                all &= gR[i] == m;
            }
            if (all) {
                out.println(ans.size());
                for (int a : ans) {
                    if (a > 0) {
                        out.println("R " + a);
                    } else {
                        out.println("C " + (-a));
                    }
                }
                return;
            }
        }

        out.println("Poor Kazimir");
    }

    static MyScanner in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        in = new MyScanner(new FileReader("supreme.in"));
        out = new PrintWriter("supreme.out");
        new supreme_ak().solve();
        out.close();
    }

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        MyScanner(Reader r) {
            br = new BufferedReader(r);
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
    }
}
