class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.u: B = None
        self.o: C = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
a = B("a")
i = C("i")
n = D("n")
j = E("j")
e = F("e")

b.o = j
b.r = j
b.v = a
b.w = e
a.w = b
i.x = a
i.z = b
i.p = e
n.q = b
j.t = b
j.v = b
j.y = b
j.u = a
j.z = a
j.o = i
e.z = j
e.r = j
e.v = j
e.x = a
assert a.w.o.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: B = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.u: B = None
        self.o: C = None
        self.y: A = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

b = A("b")
a = B("a")
i = C("i")
n = D("n")
j = E("j")
e = F("e")

b.o = j
b.r = j
b.v = a
b.w = e
a.w = b
i.x = a
i.z = b
i.p = e
n.q = b
j.t = b
j.v = b
j.y = b
j.u = a
j.z = a
j.o = i
e.z = j
e.r = j
e.v = j
e.x = a
assert a.w.o.t.v.txt == "a"