The input will be two five letter words. They don't actually have to be dictionary words, just any five letters each, all lowercase or all uppercase, your choice. Only A-Z will appear in the input words and they will always be 5 characters in length.
Your program is to score them both as though they were poker hands and output the higher hand. Of course suits won't apply here, only rankings so there's no flushes.
The typical poker ranking system goes: '1 pair', '2 pairs', '3 of a kind', 'straight', 'full house', '4 of a kind', '5 of a kind', and of course there is the possibility the hand (or word in this case) could be worth nothing.
In the case of ties, letters closer to A are considered higher, so a pair of As beats a pair of Bs. In some cases both hands might be identical, but in a different order (or not), in that case output either hand or a resorted version of it.
This external page contains information about how to identify the winner and especially addresses ties within the specific rankings, in case you aren't familiar with how to score poker hands.
In the case of straights: the letters must be adjacent in the alphabet and are not allowed to wrap around. So 'defgh' in any order is a straight, 'xyzab' is not.
Examples of how to score a single hand:
word | scored as --------------------- ccccc | 5 of a kind <-- highest ranking woooo | 4 of a kind opopo | full house vurst | straight vovvu | 3 of a kind ppoww | 2 pairs upper | 1 pair kjsdf | high card only (in this case D) <-- lowest ranking
So the program will actually produce results like this:
input | output ----------------------- voviu,kjsdf | voviu because a pair beats nothing opoqo,upper | opoqo because 3 of a kind beats a pair woooo,ggegg | ggegg because 4 Gs beats 4 Os queue,hopup | queue because 2 pairs beats 1 pair lodpl,ddkop | ddkop because pair DD beats pair LL huhyg,hijht | huhyg both have pair HH, but G beats I ddffh,ccyyz | ccyyz both have 2 pairs, but CC(yyz) beats DD(ffh) okaok,nkunk | nkunk KK ties with KK, but NN beats OO abcdf,bcdef | bcdef because it is a straight qtery,retyq | qtery identical! so doesnt matter abedc,vyxwz | abedc because it is a "higher" straight hhhij,hijkl | hijkl because straight beats 3 of a kind aaabb,zzzzz | zzzzz because nothing beats 5 of a kind
The order of the letters in both the input and output are irrelevant, so the order in your output can be different than the input, but the same inventory of letters needs to be present.
The output must contain exactly five letters -- no more, no less.
The usual codegolf rules apply. Shortest code wins.