There's nothing wrong with the code, it should print just fine.
I noticed that you're using iOS playground, as you can import UIKit.
So my first guess is that when you first pressed (either) arrow, it tries to boot up the iOS simulator (we're not in iOS after all) but you stopped before Xcode successfully start the simulator (it could take a while). You should see "running playground" on the tool bar (the top that says ready) if that's the case.
If you're planning on using the playground for some quick'n dirty, I'd suggest that you use macOS playground instead. It'd be much faster. You can select it when you created the playground.