class Solution {
public:
vector<string> buildArray(vector<int>& target, int n)
{
vector<string> res;
int j = 1;
for(int i = 0;i < target.size();i++)
{
for(;j <= n;j++)
{
if(target[i] != j)
{
res.push_back("Push");
res.push_back("Pop");
}
else
{
res.push_back("Push");
j++;
break;
}
}
}
return res;
}
};