class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: F = None
        self.z: B = None
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: J = None
        self.z: C = None
        self.s: G = None
        self.w: B = None
        self.r: C = None
        self.x: C = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: I = None
        self.u: C = None
        self.y: D = None
        self.w: G = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: J = None
        self.z: C = None
        self.s: G = None
        self.w: B = None
        self.r: C = None
        self.x: C = None
        self.o: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: I = None
        self.u: C = None
        self.y: D = None
        self.w: G = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

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

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