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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: G = None
        self.w: G = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.w: G = None
        self.u: I = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: G = None
        self.w: G = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: G = None
        self.u: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: H = None
        self.w: G = None
        self.u: I = None
        self.v: C = None
        self.txt = txt

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

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