class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.w: F = None
        self.q: C = None
        self.u: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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