class Solution { func truncateSentence(_ s: String, _ k: Int) -> String { return s.split(separator: " ").prefix(k).joined(separator: " ") } }