class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.p: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.x: D = None
        self.o: A = None
        self.u: B = None
        self.z: E = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.u: H = None
        self.t: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

b = A("b")
m = B("m")
d = C("d")
h = D("h")
k = E("k")
l = F("l")
i = G("i")
f = H("f")
a = G("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: B = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: G = None
        self.x: D = None
        self.o: A = None
        self.u: B = None
        self.z: E = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.u: H = None
        self.t: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

b = A("b")
m = B("m")
d = C("d")
h = D("h")
k = E("k")
l = F("l")
i = G("i")
f = H("f")
a = G("a")

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