Get string from input and convert to arrays