class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.y: A = None
        self.r: D = None
        self.q: B = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: F = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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