Patternify

0

0 votes
Very-Easy
Problem

Given a input word, print them in the following pattern

Let Input be

COMPUTER

Output looks like

COMPUTER
COMPUTE
COMPUT
COMPU
COMP
COM
CO
C

another example

Input:

ALASKA

Output looks like

ALASKA
ALASK
ALAS
ALA
AL
A

Input Format

Input consists of a single line

S - String

Constraints

1 <= Length of S <= 1000

Time Limit: 0.3
Memory Limit: 256
Source Limit:
Editor Image

?