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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.y: B = None
        self.s: F = None
        self.r: F = None
        self.q: E = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: I = None
        self.t: F = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: J = None
        self.s: C = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: D = None
        self.x: A = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.s: A = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

e = A("e")
k = B("k")
n = C("n")
d = D("d")
f = E("f")
m = F("m")
c = G("c")
h = H("h")
l = I("l")
i = J("i")

e.s = h
k.r = f
k.t = h
k.p = d
n.w = e
n.v = e
n.y = k
n.s = m
n.r = m
n.q = f
n.p = c
n.u = h
d.y = e
d.x = n
d.u = n
d.z = n
d.q = l
d.s = c
d.r = c
d.v = i
d.p = i
f.v = l
f.s = l
f.t = m
f.y = i
m.y = c
m.r = c
m.v = i
m.s = n
m.w = k
c.p = l
c.t = d
c.x = e
c.z = e
c.w = i
h.s = i
h.t = c
l.r = k
l.p = d
l.s = e
l.q = n
l.t = f
i.v = l
i.x = k
i.u = m
assert i.x.r.y.u.y.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.y: B = None
        self.s: F = None
        self.r: F = None
        self.q: E = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: I = None
        self.t: F = None
        self.y: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: J = None
        self.s: C = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: D = None
        self.x: A = None
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: D = None
        self.s: A = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

e = A("e")
k = B("k")
n = C("n")
d = D("d")
f = E("f")
m = F("m")
c = G("c")
h = H("h")
l = I("l")
i = J("i")

e.s = h
k.r = f
k.t = h
k.p = d
n.w = e
n.v = e
n.y = k
n.s = m
n.r = m
n.q = f
n.p = c
n.u = h
d.y = e
d.x = n
d.u = n
d.z = n
d.q = l
d.s = c
d.r = c
d.v = i
d.p = i
f.v = l
f.s = l
f.t = m
f.y = i
m.y = c
m.r = c
m.v = i
m.s = n
m.w = k
c.p = l
c.t = d
c.x = e
c.z = e
c.w = i
h.s = i
h.t = c
l.r = k
l.p = d
l.s = e
l.q = n
l.t = f
i.v = l
i.x = k
i.u = m
assert i.x.r.y.u.y.p.p.txt == "d"