Update Main.cs

Added function to check each possible solution