f=lambda s,c,v='aeiou':[["l'",'il','lo'],['gli','i','gli'],["l'",'la','la'],['le']*3][c][[[1,2][s[0]=='s'and s[1]not in v or s[0]in'zx'or s[:2]in['gn','pn','ps']or s[0]=='i'and s[1]in v],0][s[0]in v and not(s[0]=='i'and s[1]in v)]]+' '+s print(f('macchina',2),f('zio',0),f('libri',1),f('ieri',0),f('aquile',3),f('spagnoli',1),f('golf',0),f('ombra',2),f('impossibili',1),sep='\n')
Standard input is empty
la macchina lo zio i libri lo ieri le aquile gli spagnoli il golf l' ombra gli impossibili
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!