class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.r: E = None
        self.o: D = None
        self.v: E = None
        self.u: D = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.w: A = None
        self.z: F = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.r: B = None
        self.s: D = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.q: A = None
        self.z: H = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

j = A("j")
i = B("i")
g = C("g")
e = D("e")
l = E("l")
a = F("a")
m = G("m")
b = H("b")
f = A("f")

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: C = None
        self.w: A = None
        self.z: F = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.r: B = None
        self.s: D = None
        self.o: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.q: A = None
        self.z: H = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

j = A("j")
i = B("i")
g = C("g")
e = D("e")
l = E("l")
a = F("a")
m = G("m")
b = H("b")
f = A("f")

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