class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.u: B = None
        self.v: B = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.u: B = None
        self.v: B = None
        self.w: F = None
        self.z: E = None
        self.txt = txt

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

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

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