#include <stdio.h>
#include <stdlib.h>

#define NX 8
#define NY 8

int main() {
    char tab[NX][NY];
    int cx = 4;
    int cy = 7;
    for (int i = 0; i < NX; ++i) {
        for (int j = 0; j < NY; ++j) {
            if (i == cy || j == cx) {
                tab[i][j] = '*';
            } else if (abs(cy - i) == abs(cx - j)) {
                tab[i][j] = '*';
            } else {
                tab[i][j] = ' ';
            }
        }
    }
    tab[cy][cx] = 'R';
    for (int i = 0; i < NX; ++i) {
        for (int j = 0; j < NY; ++j) {
            printf("%c ", tab[i][j]);
        }
        printf("\n");
    }
}
