Golang simple solution
go\nfunc longestBeautifulSubstring(word string) int {\n    lbs := 0\n    level := 0\n    current := 0\n    for _, c := range word {\n        switch c {\n       
```go\nfunc longestBeautifulSubstring(word string) int {\n    lbs := 0\n    level := 0\n    current := 0\n    for _, c := range word {\n        switch c {\n        case \'a\':\n            if level == 1 {\n                current++\n            } else {\n                level = 1\n                current = 1\n            }\n        case \'e\':\n            if level == 2 {\n                current++\n            } else if level == 1 {\n                level = 2\n                current++\n            } else {\n                level = 0\n                current = 0\n            }\n        case \'i\':\n            if level == 3 {\n                current++\n            } else if level == 2 {\n                level = 3\n                current++\n            } else {\n                level = 0\n                current = 0\n            }\n        case \'o\':\n            if level == 4 {\n                current++\n            } else if level == 3 {\n                level = 4\n                current++\n            } else {\n                level = 0\n                current = 0\n            }\n        case \'u\':\n            if level == 5 {\n                current++\n            } else if level == 4 {\n                level = 5\n                current++\n            } else {\n                level = 0\n                current = 0\n            }\n            if current > lbs {\n                lbs = current\n            }\n        }\n    }\n    return lbs\n}\n```
['Go']