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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: D = None
        self.u: H = None
        self.p: B = None
        self.o: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: J = None
        self.u: G = None
        self.q: G = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.v: H = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: D = None
        self.u: H = None
        self.p: B = None
        self.o: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: J = None
        self.u: G = None
        self.q: G = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: I = None
        self.v: H = None
        self.u: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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