class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: I = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.s: B = None
        self.z: C = None
        self.x: G = None
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: I = None
        self.s: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.s: B = None
        self.z: C = None
        self.x: G = None
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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