class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.t: H = None
        self.u: C = None
        self.w: H = None
        self.y: E = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.z: C = None
        self.p: C = None
        self.x: G = None
        self.o: D = None
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.v: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.t: H = None
        self.u: C = None
        self.w: H = None
        self.y: E = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.z: C = None
        self.p: C = None
        self.x: G = None
        self.o: D = None
        self.y: G = None
        self.v: D = None
        self.txt = txt

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

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