#include<stdio.h>
#include<math.h>
#include<iostream>
#include<stack>
#include<map>
#include<string.h>
#include<string>
#include<stdlib.h>
#include<sstream>
using namespace std;
typedef struct{ //PolandExp_Node
string s;
int type; //0:operatorChar;1:number
}expNode;
typedef struct{ //calPolandExp_NumStack_union
int start;
int end;
//char c;
}pairs;
typedef struct{ //ClassMapt_node
char way;
int type; //1:end
}mapNode;
class mapt{ //map
public :
mapNode node[100][100];
int start;
int used;
mapt(){
for(int i=0;i<100;i++){
for(int j=0;j<100;j++){
node[i][j].way='#';
}
}
used=0;
}
};
mapt calPoland(stack<expNode> t);
int operatorPriority(char c){
switch(c){
case '#':return 1;
case '|':return 2;
case '+