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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.r: D = None
        self.y: C = None
        self.x: D = None
        self.o: G = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.v: C = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.o: H = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

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

g = A("g")
n = B("n")
b = C("b")
a = D("a")
f = E("f")
h = F("h")
c = G("c")
i = H("i")
j = F("j")
d = E("d")

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: D = None
        self.r: D = None
        self.y: C = None
        self.x: D = None
        self.o: G = None
        self.z: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: A = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: A = None
        self.v: C = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: C = None
        self.o: H = None
        self.y: G = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.v: C = None
        self.r: H = None
        self.txt = txt

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

g = A("g")
n = B("n")
b = C("b")
a = D("a")
f = E("f")
h = F("h")
c = G("c")
i = H("i")
j = F("j")
d = E("d")

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