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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.s: D = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.y: E = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.s: D = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.y: E = None
        self.x: F = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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