class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.y: H = None
        self.o: D = None
        self.v: D = None
        self.t: G = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.s: C = None
        self.r: F = None
        self.t: D = None
        self.w: F = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.z: A = None
        self.t: G = None
        self.y: G = None
        self.w: C = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: H = None
        self.s: G = None
        self.u: F = None
        self.o: C = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.s: C = None
        self.r: F = None
        self.t: D = None
        self.w: F = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.z: A = None
        self.t: G = None
        self.y: G = None
        self.w: C = None
        self.x: E = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: H = None
        self.s: G = None
        self.u: F = None
        self.o: C = None
        self.z: E = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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