1. Summary
----------

I don't understand, how I can sort lines in some places of file, not in all file.

It would be nice, if would be possible solve this task any gratis method.

---

2. Settings
-----------

### 1. File structure

I have a big (19 MB) file `SashaMillionaire.md`, has questions of [**one game**](https://en.wikipedia.org/wiki/Who_Wants_to_Be_a_Millionaire%3F). It consists of repeating blocks. Each block has a 10 lines. Structure of file (using PCRE regular expressions)

```markdown
Millionaire
\d{18}
QUESTION.*
.*
.*
.*
.*
.*
.*
.*
Millionaire
\d{18}
QUESTION.*
.*
.*
.*
.*
.*
.*
.*

```

`SashaMillionaire.md` doesn't have another lines and text besides 10-lines blocks. It doesn't have blank lines and blocks with a greater or lesser number of lines than 10.

### 2. Example content of file

```markdown
Millionaire
123456788763237476
QUESTION|2402394827049882049
Who is the greatest Goddess in the world?
Sasha
Kristina
Sasha
Katya
Valeria
AuthorOfQuestion
Millionaire
459385734954395394
QUESTION|9845495845948594999
Where Sasha live?
Novgorod
St. Petersburg
Kazan
Novgorod
Chistopol
Another author
Millionaire
903034225025025568
QUESTION|ABC121980850540445C
Another question.
Katya
Sasha
Kazan
Chistopol
Katya
Unknown author

```

---

3. Expected behavior
--------------------

I need alphabetically sort lines 6—9, then sort 16—19, 26—29 and so on.

    **but** no sort another lines.

![Example](https://i.imgur.com/cOi05na.png)

The result should be this:

```markdown
Millionaire
123456788763237476
QUESTION|2402394827049882049
Who is the greatest Goddess of the world?
Sasha
Katya
Kristina
Sasha
Valeria
AuthorOfQuestion
Millionaire
459385734954395394
QUESTION|9845495845948594999
Where Sasha live?
Novgorod
Chistopol
Kazan
Novgorod
St. Petersburg
Another author
Millionaire
903034225025025568
QUESTION|ABC121980850540445C
Another question.
Katya
Chistopol
Katya
Sasha
Kazan
Unknown author

```

---

4. Did not help
---------------

1. Googling
2. I find, that Unix commands `sort`, `sed` and `awk` can solve similar tasks, but I don't find, how I can solve my task use these commands.