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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.s: D = None
        self.txt = txt

f = A("f")
j = B("j")
m = C("m")
h = D("h")
n = E("n")
a = F("a")
l = E("l")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.s: D = None
        self.txt = txt

f = A("f")
j = B("j")
m = C("m")
h = D("h")
n = E("n")
a = F("a")
l = E("l")

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