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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.o: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.w: G = None
        self.t: I = None
        self.v: A = None
        self.u: F = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: G = None
        self.u: G = None
        self.w: I = None
        self.x: G = None
        self.r: H = None
        self.o: A = None
        self.q: I = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.o: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: I = None
        self.w: G = None
        self.t: I = None
        self.v: A = None
        self.u: F = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: G = None
        self.u: G = None
        self.w: I = None
        self.x: G = None
        self.r: H = None
        self.o: A = None
        self.q: I = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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