class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: J = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.v: B = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.w: C = None
        self.y: I = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: H = None
        self.z: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: J = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

e = A("e")
l = B("l")
j = C("j")
m = D("m")
b = E("b")
k = F("k")
h = G("h")
a = H("a")
f = I("f")
g = J("g")

e.v = j
e.u = g
e.p = h
l.x = f
l.o = m
l.u = h
j.t = f
j.z = h
j.y = h
j.v = l
m.q = g
m.s = j
m.w = j
m.r = j
m.y = f
b.r = g
b.s = a
b.z = k
b.x = l
k.v = b
k.q = g
k.y = g
k.t = e
h.o = l
a.x = h
a.y = k
a.r = k
a.q = b
a.t = b
a.p = m
a.v = m
a.w = j
a.u = e
f.s = l
g.p = j
g.w = e
g.t = b
g.y = b
assert h.o.x.s.u.o.x.s.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: J = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.v: B = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.w: C = None
        self.y: I = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: H = None
        self.z: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: J = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.t: E = None
        self.y: E = None
        self.txt = txt

e = A("e")
l = B("l")
j = C("j")
m = D("m")
b = E("b")
k = F("k")
h = G("h")
a = H("a")
f = I("f")
g = J("g")

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