CODEIT03 - Play with Dates

no tags 

Given the date, month and year, find the day.

Input

The first line consists of an integer t, the number of test cases. Then for each test case there are three integers the day, month and year.

Output

For each test case print the day in words in a separate line (the first character should be capitalised followed by lowercase).

Constraints

1 ≤ t ≤ 100

Date/month/year ≥ 11/01/2012

Date/month/year ≤ 31/12/3000

The given date will always be a valid date.

Example

Input:
3
11 1 2012
12 1 2012
13 1 2012

Output:
Wednesday
Thursday
Friday

hide comments
Souvik Mondal : 2015-05-23 14:29:57

silly mistake....first letter is in caps.
got ac in 3rd attempt due to this :-(

Dushyant Singh: 2015-02-23 18:07:58

Good Question! Finally AC! :-)

Insomniac: 2014-12-21 11:51:13

Learned a new thing......
nice question

Nikhil Sheoran: 2014-12-10 21:02:14

Some nice tricky test cases

ivar.raknahs: 2014-12-08 21:52:49

PlZ move this to tutorial.

Tushar Sinha: 2014-10-15 19:48:59

Don't misspell the days of the week!

kelaseek: 2014-06-26 13:03:57

getting wrong answer please check.. my code gives correct answer for almost all test cases

Last edit: 2014-06-26 15:28:45
damroo: 2013-10-18 18:53:31

Pritam
your answer for 14 6 3000 is wrong...
correct ans is saturday..
check here...http://www.timeanddate.com/date/weekday.html

Last edit: 2013-10-18 18:57:08
Pritam Prakash: 2013-08-21 11:32:56

easy one!
some test cases:-
3
15 6 2562
Tuesday
14 6 3000
Sunday
15 8 2514
Wednesday

Bhagwat: 2013-06-16 04:08:13

Here is some test cases
3
13 12 3000
Saturday
31 12 3000
Wednesday
28 2 2000
Saturday

@Zeref your first case is wrong!!


Added by:cegprakash
Date:2012-01-09
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All