Python 2, 5 bytes/line
exec\
'f\
o\
r\
\
x\
\
i\
n\
\
x\
r\
a\
n\
g\
e\
(\
1\
,\
i\
n\
p\
u\
t\
(\
)\
+\
1\
)\
:\
\n\
\
i\
f\
\
x\
%\
1\
5\
=\
=\
0\
:\
s\
="\
A\
p\
p\
l\
e\
P\
i\
e"\
\n\
\
e\
l\
i\
f\
\
x\
%\
5\
=\
=\
0\
:\
s\
="\
P\
i\
e"\
\n\
\
e\
l\
i\
f\
\
x\
%\
3\
=\
=\
0\
:\
s\
="\
A\
p\
p\
l\
e"\
\n\
\
e\
l\
s\
e\
:\
s\
=\
x\
\n\
\
p\
r\
i\
n\
t\
(\
s\
)'
Martmists
- 447
- 2
- 9