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


char pole[64];
void prn(){
   printf("\n");
   for (int y=0;y<8;y++){
      for (int x=0;x<8;x++)
         printf("%S",pole[y*8+x]?L" X":L" -");
      printf("\n");
   }
   printf("\n");
}
void res(){
   for (int o=0;o<8;o++)
      ((long long *)pole)[o]=0;
}

bool e_1(int x,int y){
   return (x>=0 and x<=7 and y>=0 and y<=7);
}

void m_1(int x,int y){
   for (int i=-10;i<10;i++){
      if (e_1(x+i,y+i))pole[(y+i)*8+(x+i)]=1;
      if (e_1(x-i,y+i))pole[(y+i)*8+(x-i)]=1;
   }
}

void m_2(int x,int y){
   for (int _x=0;_x<8;_x++)
      for (int _y=0;_y<8;_y++)
         pole[_y*8+_x]=abs(_x-x)==abs(_y-y);
}

void m_3(int x,int y){
   for (int _x=0;_x<8;_x++){
      if (int u=y+(x-_x);u>=0 and u<=7) pole[u*8+_x]=1;
      if (int u=y+(_x-x);u>=0 and u<=7) pole[u*8+_x]=1;
   }
}

int main()
{
   res();
   m_1(3,4);
   prn();

   res();
   m_2(5,6);
   prn();

   res();
   m_3(2,1);
   prn();


   return 0;
}
