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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.q: E = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.u: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: E = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

k = A("k")
n = B("n")
d = C("d")
f = D("f")
e = E("e")
b = F("b")
j = F("j")
h = C("h")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.q: E = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.u: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: E = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

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

k = A("k")
n = B("n")
d = C("d")
f = D("f")
e = E("e")
b = F("b")
j = F("j")
h = C("h")
l = E("l")

k.o = n
n.w = k
n.q = d
n.o = d
n.x = f
n.p = f
n.r = b
d.z = l
d.s = k
d.q = e
d.v = e
f.p = j
f.q = h
f.u = n
f.o = d
e.u = b
e.w = h
e.z = l
e.q = l
e.r = n
b.x = n
b.p = n
b.z = k
b.u = k
j.x = n
j.p = n
j.z = k
j.u = k
h.z = e
h.v = e
h.s = k
h.q = l
l.u = j
l.w = d
l.z = e
l.q = e
l.r = n
assert b.p.r.z.o.x.txt == "f"