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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: E = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: E = None
        self.v: B = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: E = None
        self.z: B = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: E = None
        self.v: B = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: F = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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