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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.t: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: H = None
        self.y: E = None
        self.u: B = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: C = None
        self.t: I = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: H = None
        self.y: E = None
        self.u: B = None
        self.p: B = None
        self.x: F = None
        self.txt = txt

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

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

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