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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.z: D = None
        self.u: B = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.q: F = None
        self.x: F = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.p: D = None
        self.q: D = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.z: D = None
        self.u: B = None
        self.o: F = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.q: F = None
        self.x: F = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: A = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.p: D = None
        self.q: D = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

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