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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: J = None
        self.s: B = None
        self.x: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: J = None
        self.s: B = None
        self.x: E = None
        self.q: F = None
        self.z: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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