class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.q: G = None
        self.w: A = None
        self.u: E = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.q: G = None
        self.w: A = None
        self.u: E = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

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

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