s="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div>
<div>Farmer John has a large farm with N barns (1&le;N&le;10^5), some of which are already painted and some n</div>
<div>ot yet painted. Farmer John wants to paint these remaining barns so that all the barns are painted,&nbsp;</div>
<div>but he only has three paint colors available. Moreover, his prize cow Bessie becomes confused if two</div>
<div>&nbsp;barns that are directly reachable from one another 