Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Festival of SUST

Limits 3s, 512 MB

Shahjalal University of Science and Technology is famous for their student organizations as they have more than 56 student organizations and all the 26 departments have their own student society. Each and every organization and departmental society organize their own events on regular basis. Like every other department, Department of Computer Science and Engineering organizes CSE Carnival frequently but this year Dept. of CSE is organizing SUST Techfest in collaboration with Dept. of EEE and SWE. Now participants are getting confused about the festival title. To resolve this confusion Dr. M. Jahirul Islam, Head of CSE, SUST gave a press release with the following statement

  1. If the festival is organized by only dept of CSE, SUST then we will call it “SUST CSE Carnival”
  2. If the festival is organized by three or more department including CSE, EEE and SWE then we will call it “SUST Tech Fest”
  3. Otherwise we will call it “Festival of SUST”

As you are a great programmer can you resolve this confusion?

NB: You can assume that any three length word consisting of exactly 3 capital letters is a valid department of SUST. Also note that a valid department can have any number of leading and trailing comma(,), dot(.) and whitespace. For example ”,CSE”, ”.CSE”, “CSE,”, “CSE.” are valid departments. But “CSE123”, “C.S.E” are not.


The first line of the input contains an integer T, denoting the number of test cases. For each test case, there will be a line containing the statement of festival declaration from the SUST authority. Each input will consist of only alphabet, digit, comma(,), dot(.) and whitespace.


1≤ T ≤ 1000

10≤ length of statement ≤ 100


For each test case, print the case number and the name of the festival.


Department of CSE, SUST will organize SIUPC in april, 2019.
Case 1: SUST CSE Carnival


    50% Solution Ratio

    prodip_bsmrstu Earliest, 5M ago

    alifcseju Fastest, 0.0s

    Robbin Lightest, 131 kB

    me_redwan Shortest, 995B


    Login to submit