An **undulating number** is a number that alternates between two digits, starting with one digit and then switching to another, and repeating this pattern. For example, `1212121` is undulating, but `1991` is not.
Write a function `is_undulating(n)` that checks whether a given number `n` is undulating or not. The function should return `True` if the number is undulating, and `False` otherwise.
#### Examples
```python [main.nopy]
is_undulating(1212121) # True
is_undulating(1991) # False
is_undulating(121) # True
is_undulating(1) # False
```
#### Constraints
- The input `n` will be a positive integer.
- A number with fewer than three digits cannot be undulating.