class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: G = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: G = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: G = None
        self.u: G = None
        self.t: C = None
        self.w: C = None
        self.y: J = None
        self.s: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: J = None
        self.x: H = None
        self.r: J = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.u: G = None
        self.z: F = None
        self.s: F = None
        self.p: A = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.r: C = None
        self.w: J = None
        self.x: F = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: G = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: G = None
        self.u: G = None
        self.t: C = None
        self.w: C = None
        self.y: J = None
        self.s: J = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: J = None
        self.x: H = None
        self.r: J = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: F = None
        self.u: G = None
        self.z: F = None
        self.s: F = None
        self.p: A = None
        self.x: D = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.r: C = None
        self.w: J = None
        self.x: F = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

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