
class Remote
{
protected int current_volume;
protected int current_channel;
}

 interface IRemoteProperties
{
public static final int maxReceiverChannels = 300;
 static final int maxTVChannels = 150;

 static final void increaseVolume();
 static final void decreaseVolume();
 static final void nextChannel();
 static final void previousChannel();
 static final void setCurrentChannel(int channel);
}

class TVRemote extends Remote implements IRemoteProperties
{

 TVRemote()
{
  current_volume = 50; 
  current_channel = 1; 
}

public void increaseVolume()
{
   if (current_volume < 100) {
           current_volume++;
   }
}

public void decreaseVolume()
{
   if (current_volume > 0) {
           current_volume--;
   }
}

public void nextChannel()
{
  if (current_channel < maxTVChannels) {
     current_channel++;
  } else {
     current_channel = 1; 
  }
}

public void previousChannel()
{
  if (current_channel > 1) {
     current_channel--;
  } else {
     current_channel = maxTVChannels; 
  }
} 

public void setCurrentChannel(int channel)
{
   if (channel >= 1 && channel <= maxTVChannels) {
      current_channel = channel;
   }
}
}

class ReceiverRemote extends Remote implements IRemoteProperties
{

 ReceiverRemote()
{
  current_volume = 50; 
  current_channel = 1; 
}

public void increaseVolume()
{
   if (current_volume < 100) {
           current_volume++;
   }
}

public void decreaseVolume()
{
   if (current_volume > 0) {
           current_volume--;
   }
}

public void nextChannel()
{
  if (current_channel < maxTVChannels) {
     current_channel++;
  } else {
     current_channel = 1; 
  }
}

public void previousChannel()
{
  if (current_channel > 1) {
     current_channel--;
  } else {
     current_channel = maxTVChannels; 
  }
} 

public void setCurrentChannel(int channel)
{
   if (channel >= 1 && channel <= maxTVChannels) {
      current_channel = channel;
   }
}
}

class TVREC {
    public static void main(String[] args) {
        
    }
}