JSFiddle - React, Tailwind, and code Playground
by Derek Leung
JavaScript
//186 chars
function m(t){a=Math.max,l=t.split(" "),d=l.map(function(s){return a.apply(Math,s.split("").map(function(e){return s.split(e).length}))});n=a.apply(Math,d);return n-2?l[d.indexOf(n)]:-1}
//usage
$("body").text(m("Today, is the greatest day ever!"));