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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.q: F = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: F = None
        self.y: G = None
        self.x: E = None
        self.r: F = None
        self.v: F = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.q: F = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: G = None
        self.o: F = None
        self.y: G = None
        self.x: E = None
        self.r: F = None
        self.v: F = None
        self.p: A = None
        self.q: G = None
        self.txt = txt

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

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