class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: C = None
        self.s: G = None
        self.z: E = None
        self.p: E = None
        self.q: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.u: G = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.o: C = None
        self.q: B = None
        self.t: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: A = None
        self.u: G = None
        self.s: C = None
        self.x: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.o: C = None
        self.q: B = None
        self.t: H = None
        self.x: D = None
        self.txt = txt

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

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

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