class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: D = None
        self.p: I = None
        self.t: H = None
        self.y: B = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: B = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.y: A = None
        self.t: E = None
        self.x: E = None
        self.z: B = None
        self.s: I = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.o: B = None
        self.v: D = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: B = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.y: A = None
        self.t: E = None
        self.x: E = None
        self.z: B = None
        self.s: I = None
        self.r: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.o: B = None
        self.v: D = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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