What is this date format? For Gregorian calendars, the date format varies from a country to another. There are three main formats recognized:


YY-MM-DD (big-endian)
DD-MM-YY (little-endian)
MM-DD-YY (middle-endian)


Your task is to write a program which, given an input string representing a date, output all the possible date formats by which this string can be interpreted as a date.

Rules


The input date is in the format xx-xx-xx, where each field is two digits and zero-padded.
The date is always valid (so you cannot get things like 14-13-17)
The date is always at least one of the formats above (so you cannot get things like 17-14-11)
Because we are in fact in a parallel world, there are 31 days for every month of the year, and consequently no leap years
The date is between January 01, 2001 and December 31, 2099
If there is only one format for the date, the code must print only it (only trailing newlines are allowed)
If there are several formats for the date, they must be either separated by a comma, a space, a newline, or a combination of those
You must output the exact name(s) of the format(s). Using distinct arbitrary values is not allowed.
No leading or trailing characters others than a trailing space are allowed
The output must be lowercase
You are not allowed to use any built-in date or calendar functions
The output formats do not have to be sorted


Examples

Input      Output
30-05-17   big-endian, little-endian
05-15-11   middle-endian
99-01-02   big-endian
12-11-31   big-endian, little-endian, middle-endian
02-31-33   middle-endian


This is code-golf so the shortest code in bytes wins. Explanations are encouraged.
Python 2, 123 bytes



a,b,c=map(int,input().split('-'))
for a,b,c in[[b,c,'big'],[b,a,'little'],[a,b,'middle']]:print(c+'-endian')*(a&lt;13)*(b&lt;32),


Try it online!



Python 2, less input parsing, 123 bytes



d=input()
for a,b,c in[[3,6,'big'],[3,0,'little'],[0,3,'middle']]:print(c+'-endian')*(int(d[a:a+2])&lt;13)*(int(d[b:b+2])&lt;32),


Try it online!