Also an elegant solution by Ed0906. Following are code snippets of his approach. It works for now, the question is how long ...