import
java.io.*;
public
class
GFG {
public
static
void
main(String[] args)
throws
IOException
{
byte
[] byteArray
=
new
byte
[] {
'G'
,
'E'
,
'E'
,
'K'
,
'S'
,
'F'
,
'O'
,
'R'
,
'G'
,
'E'
,
'E'
,
'K'
,
'S'
};
InputStream inputStr
=
new
ByteArrayInputStream(byteArray);
PushbackInputStream pushbackInputStr
=
new
PushbackInputStream(inputStr,
100
);
for
(
int
i =
0
; i < byteArray.length; i++) {
System.out.print(
(
char
)pushbackInputStr.read());
}
byte
[] b =
new
byte
[] {
'W'
,
'X'
,
'Y'
,
'Z'
};
pushbackInputStr.unread(b,
1
,
3
);
System.out.println();
for
(
int
i =
0
; i <
3
; i++) {
System.out.print(
(
char
)pushbackInputStr.read());
}
}
}