class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: I = None
        self.u: C = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.r: D = None
        self.v: A = None
        self.t: B = None
        self.u: E = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.r: D = None
        self.v: A = None
        self.t: B = None
        self.u: E = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: H = None
        self.w: C = None
        self.txt = txt

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

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