class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.q: G = None
        self.r: G = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.u: I = None
        self.o: F = None
        self.y: A = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.y: I = None
        self.s: D = None
        self.w: G = None
        self.x: G = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.z: B = None
        self.t: B = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.u: I = None
        self.o: F = None
        self.y: A = None
        self.r: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: H = None
        self.y: I = None
        self.s: D = None
        self.w: G = None
        self.x: G = None
        self.q: D = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.z: B = None
        self.t: B = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

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