class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: G = None
        self.u: E = None
        self.r: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.q: D = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: G = None
        self.q: F = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.q: D = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.t: G = None
        self.q: F = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

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

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