Medium
Starts and Ends
Read a filename and print
image if it ends with .png or .jpg, document if it ends with .pdf, otherwise other. Ignore case.Input
One filename.
Output
image, document or other.
Sample 1
Input
photo.png
Output
image
Sample 2
Input
Report.PDF
Output
document
Output appears here