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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.w: I = None
        self.v: B = None
        self.r: C = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.y: G = None
        self.q: H = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: F = None
        self.w: I = None
        self.v: B = None
        self.r: C = None
        self.o: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.y: G = None
        self.q: H = None
        self.s: H = None
        self.txt = txt

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

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