# Генерация тестовых наборов данных

import random

def generate_records(n, seed=42):
    random.seed(seed)
    records = []
    for i in range(1, n + 1):
        name = f"User_{i:05d}"
        phone = f"{random.randint(100,999)}-{random.randint(1000,9999)}"
        records.append((name, phone))
    return records

def prepare_datasets(base_records):
    shuffled = base_records.copy()
    random.shuffle(shuffled)
    sorted_records = sorted(base_records, key=lambda x: x[0])
    return shuffled, sorted_records