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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: I = None
        self.s: F = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: I = None
        self.s: F = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.txt = txt

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

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