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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.o: B = None
        self.v: F = None
        self.q: G = None
        self.s: B = None
        self.p: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.v: C = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: E = None
        self.txt = txt

l = A("l")
j = B("j")
n = C("n")
m = D("m")
g = E("g")
c = F("c")
e = G("e")
i = H("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: G = None
        self.o: B = None
        self.v: F = None
        self.q: G = None
        self.s: B = None
        self.p: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: D = None
        self.v: C = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: E = None
        self.txt = txt

l = A("l")
j = B("j")
n = C("n")
m = D("m")
g = E("g")
c = F("c")
e = G("e")
i = H("i")

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