class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.t: H = None
        self.x: C = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: J = None
        self.u: J = None
        self.x: B = None
        self.w: F = None
        self.t: I = None
        self.z: G = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.t: H = None
        self.x: C = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: J = None
        self.u: J = None
        self.x: B = None
        self.w: F = None
        self.t: I = None
        self.z: G = None
        self.o: D = None
        self.v: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

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

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