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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.z: F = None
        self.u: A = None
        self.p: J = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.z: F = None
        self.u: A = None
        self.p: J = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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