class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: I = None
        self.q: G = None
        self.o: H = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.z: B = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: I = None
        self.w: E = None
        self.r: J = None
        self.t: B = None
        self.s: E = None
        self.x: I = None
        self.o: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: I = None
        self.z: B = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: I = None
        self.w: E = None
        self.r: J = None
        self.t: B = None
        self.s: E = None
        self.x: I = None
        self.o: B = None
        self.q: I = None
        self.u: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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