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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.y: G = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: J = None
        self.o: F = None
        self.q: C = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.y: G = None
        self.q: C = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: J = None
        self.o: F = None
        self.q: C = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

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

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

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

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