Write a program that takes one string and the number of substrings to split it. The program should split the string into substrings using any number of spaces (1 or more) as a separator.
Input: string: String, n: Int
Output: resulting n substrings, each on a new line.