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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.v: D = None
        self.y: F = None
        self.x: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.u: F = None
        self.p: G = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.v: D = None
        self.y: F = None
        self.x: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.u: F = None
        self.p: G = None
        self.y: E = None
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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