fork(11) download
  1. a,b,c=io.read(),io.read(),io.read()function d(u)if ("aeiouAEIOU"):find(z(u))~=nil then return "an" else return "a" end end function z(y)return y:sub(1,1):upper()end f=z(a)..a:sub(2).."-"..z(b)..b:sub(2).."-"..z(c)..c:sub(2).."-"..z(a)..a:sub(2)print(z(a).."-"..z(b).."-"..z(c).."-"..z(a).."\n\nI have "..d(a).." "..a..", I have "..d(c).." "..c..".\nUh! "..z(c)..c:sub(2).."-"..z(a)..a:sub(2).."!\n\nI have "..d(a).." "..a..", I have "..d(b).." "..b..".\nUh! "..z(b)..b:sub(2).."-"..z(a)..a:sub(2).."!\n\n"..z(c)..c:sub(2).."-"..z(a)..a:sub(2)..", "..z(b)..b:sub(2).."-"..z(a)..a:sub(2)..".\nUh! "..f..".\n"..f.."!")
Success #stdin #stdout 0s 2848KB
stdin
pen
pineapple
apple
stdout
P-P-A-P

I have a pen, I have an apple.
Uh! Apple-Pen!

I have a pen, I have a pineapple.
Uh! Pineapple-Pen!

Apple-Pen, Pineapple-Pen.
Uh! Pen-Pineapple-Apple-Pen.
Pen-Pineapple-Apple-Pen!