#include <iostream>
#include<string>
using namespace std;
const int num_of_planes=1000;
struct plane_data{
int code;
string model;
int rows;
int nom_of_seats;
string seats[15][100];
};
void add_planes(plane_data planes[],int count){
cout << "\nEnter Plane Code: ";
cin >> planes[count].code;
cout << "Enter Model: ";
cin >> planes[count].model;
cout << "Enter Number of Rows: ";
cin >> planes[count].rows;
cout << "Enter Number of seats: ";
cin >> planes[count].nom_of_seats;
cout << "Enter Seats Number: ";
for (int i = 1; i <= planes[count].rows; i++)
{
string seat;
string chair = "a";
string nom_of_chair;
for (int j = 0; j < planes[count].nom_of_seats; j++)
{
nom_of_chair = to_string(i);
seat = chair;
seat = seat.append(nom_of_chair);
planes[count].seats[j][i] = seat;
cout << planes[count].seats[j][i] << endl;
chair[0]+=1;
}
}
count++;
cout << "Plane Added Successfully!\n";
}
int main(){
plane_data planes[num_of_planes];
add_planes(planes,0);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZTxzdHJpbmc+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpjb25zdCBpbnQgbnVtX29mX3BsYW5lcz0xMDAwOwoKc3RydWN0IHBsYW5lX2RhdGF7CiAgICBpbnQgY29kZTsKICAgIHN0cmluZyBtb2RlbDsKICAgIGludCByb3dzOwogICAgaW50IG5vbV9vZl9zZWF0czsKICAgIHN0cmluZyBzZWF0c1sxNV1bMTAwXTsKfTsKCnZvaWQgYWRkX3BsYW5lcyhwbGFuZV9kYXRhIHBsYW5lc1tdLGludCBjb3VudCl7Cgpjb3V0IDw8ICJcbkVudGVyIFBsYW5lIENvZGU6ICI7CiAgICBjaW4gPj4gcGxhbmVzW2NvdW50XS5jb2RlOwoKICAgIGNvdXQgPDwgIkVudGVyIE1vZGVsOiAiOwogICAgY2luID4+IHBsYW5lc1tjb3VudF0ubW9kZWw7CgogICAgY291dCA8PCAiRW50ZXIgTnVtYmVyIG9mIFJvd3M6ICI7CiAgICBjaW4gPj4gcGxhbmVzW2NvdW50XS5yb3dzOwoKICAgIGNvdXQgPDwgIkVudGVyIE51bWJlciBvZiBzZWF0czogIjsKICAgIGNpbiA+PiBwbGFuZXNbY291bnRdLm5vbV9vZl9zZWF0czsKCiAgICAKICAgIGNvdXQgPDwgIkVudGVyIFNlYXRzIE51bWJlcjogIjsKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IHBsYW5lc1tjb3VudF0ucm93czsgaSsrKQogICAgewogICAgICAgIHN0cmluZyBzZWF0OwogICAgICAgIHN0cmluZyBjaGFpciA9ICJhIjsKICAgICAgICBzdHJpbmcgbm9tX29mX2NoYWlyOwogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgcGxhbmVzW2NvdW50XS5ub21fb2Zfc2VhdHM7IGorKykKICAgICAgICB7CiAgICAgICAgICAgIG5vbV9vZl9jaGFpciA9IHRvX3N0cmluZyhpKTsKICAgICAgICAgICAgc2VhdCA9IGNoYWlyOwogICAgICAgICAgICBzZWF0ID0gc2VhdC5hcHBlbmQobm9tX29mX2NoYWlyKTsKICAgICAgICAgICAgCiAgICAgICAgICAgIHBsYW5lc1tjb3VudF0uc2VhdHNbal1baV0gPSBzZWF0OwogICAgICAgICAgICBjb3V0IDw8IHBsYW5lc1tjb3VudF0uc2VhdHNbal1baV0gPDwgZW5kbDsKICAgICAgICAgICAgCiAgICAgICAgICAgIGNoYWlyWzBdKz0xOwogICAgICAgIH0KICAgIH0KCiAgICBjb3VudCsrOwogICAgY291dCA8PCAiUGxhbmUgQWRkZWQgU3VjY2Vzc2Z1bGx5IVxuIjsKfQoKCmludCBtYWluKCl7CgpwbGFuZV9kYXRhIHBsYW5lc1tudW1fb2ZfcGxhbmVzXTsKCmFkZF9wbGFuZXMocGxhbmVzLDApOwoKfQ==