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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.s: F = None
        self.p: G = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.p: J = None
        self.v: A = None
        self.w: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.w: B = None
        self.q: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: C = None
        self.s: F = None
        self.p: G = None
        self.z: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.p: J = None
        self.v: A = None
        self.w: J = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.w: B = None
        self.q: H = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.r: C = None
        self.s: A = None
        self.txt = txt

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

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