#include<iostream>
using std::cout;

class Channel {
protected:
	virtual int buff()=0;
	virtual void buffw(int)=0;
};

class Input: public Channel {
 public:
	virtual void in(int val) { buffw(val);}

};

class Output : public Channel {
 public:
	virtual int out() { return buff();}

};

class UnsecuredIO : public Input, public Output {
	int buffer;
	int buff() { return buffer;}
	void buffw(int e){buffer=e;}; 
};


int main () {
 
 UnsecuredIO *u = new UnsecuredIO();
// Input *in = u;
// Output *out= u;

 u->in(25);
 int x = u->out();
 cout<<x << "\n";

// in->in(25);
// int x = out->out();
// cout<<x << "\n";


}


