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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.p: D = None
        self.u: G = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.w: B = None
        self.v: C = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: J = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: F = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.q: H = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
c = C("c")
h = D("h")
d = E("d")
b = F("b")
f = G("f")
n = H("n")
k = I("k")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: G = None
        self.p: D = None
        self.u: G = None
        self.v: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: G = None
        self.w: B = None
        self.v: C = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: J = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: F = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: B = None
        self.q: H = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

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

e = A("e")
l = B("l")
c = C("c")
h = D("h")
d = E("d")
b = F("b")
f = G("f")
n = H("n")
k = I("k")
j = J("j")

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