class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: D = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.u: E = None
        self.x: I = None
        self.w: J = None
        self.v: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.r: A = None
        self.p: I = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.o: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: I = None
        self.u: E = None
        self.x: I = None
        self.w: J = None
        self.v: J = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.r: A = None
        self.p: I = None
        self.u: H = None
        self.txt = txt

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

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