#include <iostream>
using namespace std;

int main()
{
  int a[2][6]={1,2,3,4,5,6,7,8,9,10,11,12};
  int *b;

  b = &a[0][0];

  for (int i=0; i<12; i++)
    {
      cout << *(b+i) << " " ;
    }
  cout << endl;
  for (int i=0; i<2; i++)
    {
      for (int j=0; j<6; j++)
	{
	  cout << *(b+(6*i)+j) << " ";
	}
      cout << endl;
    }
  cout << endl;  
}

