struct Pair<T, U> {
    first: T,
    second: U,
}

impl<T, U> Pair<T, U> {
    fn new(first: T, second: U) -> Self {
        Pair { first, second }
    }

    fn swap(self) -> Pair<U, T> {
        Pair {
            first: self.second,
            second: self.first,
        }
    }
}

fn main() {
    let pair = Pair::new(1, "hello");
    println!("First: {}, Second: {}", pair.first, pair.second);

    let swapped_pair = pair.swap();
    println!("Swapped - First: {}, Second: {}", swapped_pair.first, swapped_pair.second);
}