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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.x: H = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.t: B = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: B = None
        self.q: G = None
        self.o: D = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: E = None
        self.x: H = None
        self.w: F = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.t: B = None
        self.r: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: B = None
        self.q: G = None
        self.o: D = None
        self.t: G = None
        self.u: H = None
        self.txt = txt

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

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

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

a.x = e
a.s = m
c.x = a
c.y = d
b.t = c
b.o = j
b.p = j
b.x = m
b.w = e
n.z = e
n.x = e
n.y = j
n.t = c
n.r = b
j.p = m
j.z = n
j.y = b
j.u = e
j.w = a
j.q = d
e.s = a
e.y = c
e.q = d
e.t = d
e.o = n
e.u = m
d.q = c
d.y = c
d.r = e
d.w = e
d.u = i
d.t = m
m.x = e
m.z = a
i.p = m
i.z = n
i.y = b
i.u = e
i.w = a
i.q = d
assert j.u.t.t.z.x.o.y.p.txt == "m"