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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: I = None
        self.r: I = None
        self.w: I = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.s: A = None
        self.y: I = None
        self.t: B = None
        self.q: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.y: C = None
        self.t: B = None
        self.u: A = None
        self.w: J = None
        self.q: I = None
        self.o: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: A = None
        self.w: F = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: I = None
        self.r: I = None
        self.w: I = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: H = None
        self.s: A = None
        self.y: I = None
        self.t: B = None
        self.q: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.y: C = None
        self.t: B = None
        self.u: A = None
        self.w: J = None
        self.q: I = None
        self.o: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: A = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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