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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: I = None
        self.p: F = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.z: E = None
        self.y: G = None
        self.p: B = None
        self.o: F = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: C = None
        self.t: G = None
        self.r: E = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: I = None
        self.p: F = None
        self.z: D = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.z: E = None
        self.y: G = None
        self.p: B = None
        self.o: F = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: C = None
        self.t: G = None
        self.r: E = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

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

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