class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.v: F = None
        self.z: B = None
        self.y: B = None
        self.u: H = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: A = None
        self.t: I = None
        self.s: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: A = None
        self.t: I = None
        self.s: I = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: I = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

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