class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: H = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.q: F = None
        self.w: A = None
        self.p: H = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.y: G = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.z: C = None
        self.t: F = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: H = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: H = None
        self.q: F = None
        self.w: A = None
        self.p: H = None
        self.y: F = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: D = None
        self.y: G = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.z: C = None
        self.t: F = None
        self.p: C = None
        self.w: B = None
        self.txt = txt

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

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