class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: I = None
        self.t: I = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: E = None
        self.w: F = None
        self.o: A = None
        self.u: H = None
        self.p: H = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.p: F = None
        self.x: F = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: E = None
        self.w: F = None
        self.o: A = None
        self.u: H = None
        self.p: H = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: G = None
        self.p: F = None
        self.x: F = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.txt = txt

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

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

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