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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.x: H = None
        self.u: G = None
        self.w: H = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: H = None
        self.x: H = None
        self.u: G = None
        self.w: H = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.w: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: J = None
        self.w: H = None
        self.txt = txt

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

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

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