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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: A = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.u: F = None
        self.r: F = None
        self.y: A = None
        self.t: J = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: A = None
        self.s: B = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: G = None
        self.u: F = None
        self.r: F = None
        self.y: A = None
        self.t: J = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.s: E = None
        self.o: A = None
        self.txt = txt

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

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

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