class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: E = None
        self.v: H = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.w: H = None
        self.p: F = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.w: H = None
        self.p: F = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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

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