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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.s: B = None
        self.q: A = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: F = None
        self.s: B = None
        self.q: A = None
        self.y: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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