class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.o: D = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: D = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.q: A = None
        self.txt = txt

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

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