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

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

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

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

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

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

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

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

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

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

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

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

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

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

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