Logo
(追記) (追記ここまで)

29542번 - Wipe it! 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB65453879.167%

문제

In order to make his lessons more entertaining, one computer science teacher has invented a funny exercise.

During the exercise the teacher consequently writes out the letters of some word he had just thought of at the blackboard. Students' task is to shout <<Wipe it!>> every time the word written at the blackboard has some suffix which has already occurred at some other location in the word.

The moment the teacher hears the shout, he wipes off the suffix students has found and goes on writing out remaining letters.

Given the word the teacher has thought of and assuming students perfectly fulfil their task, find out the word that would be written on the blackboard in the end of the exercise.

입력

The input file contains a single line --- the word teacher thought of. It consists of lowercase English letters and it's length does not exceed 1000ドル$ characters.

출력

Output a single line --- the word that would be written at the blackboard at the end of the exercise.

제한

예제 입력 1

abcabc

예제 출력 1

abc

예제 입력 2

aaaaaaaa

예제 출력 2

a

힌트

출처

Olympiad > Russian Olympiad in Informatics > Internet Olympiads in Informatics > 2010-2011 Season > February 11, 2011 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /