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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.w: C = None
        self.r: D = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

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

j = A("j")
l = B("l")
m = C("m")
b = D("b")
e = E("e")
g = F("g")
c = C("c")
f = D("f")
d = A("d")
h = B("h")

j.t = e
j.z = m
l.o = j
l.q = c
l.y = m
l.r = b
m.q = c
m.p = g
m.z = g
m.o = b
b.y = c
b.w = c
b.u = c
b.p = g
b.r = f
b.t = f
e.o = g
e.r = g
e.y = j
e.q = h
g.x = e
g.v = e
g.u = e
g.s = c
g.z = d
c.q = m
c.p = g
c.z = g
c.o = b
f.y = c
f.u = c
f.p = g
f.w = m
f.r = b
f.t = b
d.t = e
d.z = c
h.o = j
h.q = c
h.y = c
h.r = f
assert c.p.x.q.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.w: C = None
        self.r: D = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

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

j = A("j")
l = B("l")
m = C("m")
b = D("b")
e = E("e")
g = F("g")
c = C("c")
f = D("f")
d = A("d")
h = B("h")

j.t = e
j.z = m
l.o = j
l.q = c
l.y = m
l.r = b
m.q = c
m.p = g
m.z = g
m.o = b
b.y = c
b.w = c
b.u = c
b.p = g
b.r = f
b.t = f
e.o = g
e.r = g
e.y = j
e.q = h
g.x = e
g.v = e
g.u = e
g.s = c
g.z = d
c.q = m
c.p = g
c.z = g
c.o = b
f.y = c
f.u = c
f.p = g
f.w = m
f.r = b
f.t = b
d.t = e
d.z = c
h.o = j
h.q = c
h.y = c
h.r = f
assert c.p.x.q.r.txt == "f"