class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.v: I = None
        self.s: E = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: E = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: C = None
        self.q: G = None
        self.w: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: H = None
        self.x: G = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.v: I = None
        self.s: E = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.y: E = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: C = None
        self.q: G = None
        self.w: A = None
        self.p: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: H = None
        self.x: G = None
        self.w: C = None
        self.txt = txt

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

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