Ana has $22$ coins. She can take from her friends either $6$ coins or $18$ coins, or she can give $12$ coins to her friends. She can do these operations many times she wants. Find the least number of coins Ana can have.
1. **Identify the operations and their effects on the number of coins:**
   - Ana can take 6 coins: \( n \rightarrow n + 6 \)
   - Ana can take 18 coins: \( n \rightarrow n + 18 \)
   - Ana can give 12 coins: \( n \rightarrow n - 12 \)

2. **Analyze the problem using modular arithmetic:**
   - Since \( 6 \equiv 0 \pmod{6} \), \( 18 \equiv 0 \pmod{6} \), and \( -12 \equiv 0 \pmod{6} \), all operations are congruent to 0 modulo 6.
   - This means that any operation Ana performs will not change the residue of the number of coins modulo 6.

3. **Determine the initial number of coins modulo 6:**
   - Ana starts with 22 coins.
   - Calculate \( 22 \mod 6 \):
     \[
     22 \div 6 = 3 \quad \text{remainder} \quad 4
     \]
     Therefore, \( 22 \equiv 4 \pmod{6} \).

4. **Find the least number of coins Ana can have:**
   - Since all operations are congruent to 0 modulo 6, the residue of the number of coins modulo 6 will always be 4.
   - The smallest non-negative integer that is congruent to 4 modulo 6 is 4 itself.

Thus, the least number of coins Ana can have is 4.

The final answer is \(\boxed{4}\).