Add solution for Swift

Cheat by using subscripting.