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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: I = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.w: J = None
        self.z: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.p: G = None
        self.x: A = None
        self.o: F = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: I = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.w: J = None
        self.z: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.p: G = None
        self.x: A = None
        self.o: F = None
        self.q: F = None
        self.w: G = None
        self.txt = txt

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

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

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