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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.q: I = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.t: E = None
        self.o: I = None
        self.q: I = None
        self.p: H = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.p: A = None
        self.x: C = None
        self.z: E = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: H = None
        self.q: I = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: J = None
        self.t: E = None
        self.o: I = None
        self.q: I = None
        self.p: H = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.p: A = None
        self.x: C = None
        self.z: E = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

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

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