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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.t: C = None
        self.w: A = None
        self.u: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.t: C = None
        self.w: A = None
        self.u: A = None
        self.r: D = None
        self.z: E = None
        self.txt = txt

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

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

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