class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.q: I = None
        self.u: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.x: C = None
        self.p: G = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.p: B = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.x: C = None
        self.p: G = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: F = None
        self.p: B = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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