class Reverser {
private String input;
private String output;
public Reverser(String in)
{
input = in;
}
public String doRev() {
StackX stackX = new StackX(input.length());
char[] chs = input.toCharArray();
for (int i = 0; i < chs.length; ++i)
if (!stackX.isFull())
stackX.push(chs[i]);
output = "";
while (!stackX.isEmpty())
output += stackX.pop();
return output;
}
}