class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.y: H = None
        self.u: E = None
        self.z: G = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.x: C = None
        self.p: A = None
        self.t: D = None
        self.z: B = None
        self.q: D = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: J = None
        self.w: G = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: D = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.x: C = None
        self.p: A = None
        self.t: D = None
        self.z: B = None
        self.q: D = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: J = None
        self.w: G = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

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

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

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

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