#include <iostream>

using namespace std;

int main()
{
    long n,m;
    char a[10000][100];

    cin >> n >> m;

    for (int i = 0; i < n; ++i)
        for (int j = 0; j < m; ++j)
        cin >> a[i][j];

    int i = 0;
    int j = 0;
    while (i < n && j < m)
    {
    a[i][j] = 'C';
    i++; j++;
    }

    for (int i = 0; i < n; ++i)
    {
    for (int j = 0; j < m; ++j)
        cout << a[i][j];
        cout << '\n';
    }

    return 0;
}