#include <iostream>
using namespace std;
class Student{
public:
void get_value()
{cin>>num>>name>>sex;}
void display()
{
cout<<"num:"<<num<<endl;
cout<<"name:"<<name<<endl;
cout<<"sex:"<<sex<<endl;
}
private:
int num;
char name[10];
char sex;
};
class Student1:public Student{
public:
void getvalue()
{
get_value();
cin>>age>>addr;
}
void show()
{
display();
cout<<"age:"<<age<<endl;
cout<<"address:"<<addr<<endl;
}
private:
int age;
char addr[10];
};
int main()
{
Student1 stud;
stud.getvalue();
stud.show();
return 0;
}