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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.r: F = None
        self.q: G = None
        self.t: F = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: H = None
        self.v: J = None
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: D = None
        self.r: F = None
        self.q: G = None
        self.t: F = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: H = None
        self.v: J = None
        self.t: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: I = None
        self.q: B = None
        self.txt = txt

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

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