#include <iostream>
#include<string.h>
using namespace std;
const int CHMAX = 30;

void decalage (char ch[CHMAX], int lg)
{
    int i,j;
    char tmp = ch[lg-1];

    for (i=lg-1;i>=1;i--)
    {
        ch[i] = ch[i-1];
    }
    ch[0] = tmp;
}

void affiche_toutes_les_rotations (char ch[CHMAX], int lg)
{
        int i,j;
       for (i=0;i<lg;i++)
       {
           decalage(ch,lg);
           cout<<"    "<<ch<<endl;
       }

}
int main (void)
{
    char ch[CHMAX] ="BONNE ANNEE 2022 !";
    //cout<<"Donnez une chaine de caracteres : "<<endl;
    //cin>>ch;
    int longueur = strlen(ch);
    cout<<"    "<<ch<<endl;
    affiche_toutes_les_rotations(ch, longueur);

    return 0;
}
