#include <iostream>
#include <string>
#include <algorithm>
#include <cstring>
#include <stack>
using namespace std;
struct Node {
char ch;
int val;
string code;
Node* l;
Node* r;
Node (int wei,int index):ch('A'+index),val(wei),l(NULL),r(NULL),code(""){}
};
void f(Node* k) {
k->val = 15;
}
int main() {
stack<Node*> s;
Node* tmp = new Node (23,0);
s.push(tmp);
cout<<s.top()->val<<" "<<s.top()->ch<<endl;
tmp->val = 30;
cout<<s.top()->val<<" "<<s.top()->ch<<endl;
f(s.top());
cout<<s.top()->val<<" "<<s.top()->ch<<endl;
}