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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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