Task 10.1. Find the largest 12-digit number $N$ that satisfies the following two conditions:

- In the decimal representation of the number $N$, there are six digits «4» and six digits «7»;
- In the decimal representation of the number $N$, no four consecutive digits form the number «7444».