import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.TreeMap;
import java.util.Vector;
class Variable{
boolean isString;
int intValue;
String strValue;
Variable(int intValue){
this.isString=false;
this.intValue=intValue;
this.strValue="";
}
Variable(String strValue){
this.isString=true;
this.intValue=0;
this.strValue=strValue;
}
public int getValue(TreeMap<String,Integer> Var){
if(isString){
Integer Value=Var.get(strValue);
if(Value==null) Value=0;
intValue=Value;
}
return this.intValue;
}
public String toString(){
return this.strValue;
}
}
abstract class Expression{
int type;
int jump;
String Exp;
public abstract void run(TreeMap<String,Integer> Var);
public void setInitData(int type,int jump,String Exp){
this.type=type;
this.jump=jump;
this.Exp=Exp;
}
public int getType(){
return this.type;
}
public int getJump(){
return this.jump;
}
public String getExp(){
return this.Exp;
}
}
class ExpressI extends Expression{
int ans;
Variable A;
Variable B;