 }
 catch AdventError.WrongChar {
     print("Password had invalid character")
-}+}

let alphabet = "abcdefghijklmnopqrstuvwxyz".characters

func cycleChar(oldChar: Character) throws -> Character {
    
    
    guard let oldCharIndex = alphabet.indexOf(oldChar) else {
        throw AdventError.WrongChar
    }

    return has3Straight && has2Repeat
}

// Warning, this is very slow. I imagine using C strings for so much comparison would speed it up a lot
func nextValidPassword(oldPass: String) throws -> String {
    var curPass = try incrementPassword(oldPass)
    var found = false
