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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.o: D = None
        self.q: C = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.p: B = None
        self.z: B = None
        self.q: I = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: D = None
        self.u: G = None
        self.y: A = None
        self.t: E = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.o: D = None
        self.q: C = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: H = None
        self.p: B = None
        self.z: B = None
        self.q: I = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: D = None
        self.u: G = None
        self.y: A = None
        self.t: E = None
        self.v: H = None
        self.txt = txt

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

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