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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.p: H = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.p: C = None
        self.r: G = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.p: H = None
        self.r: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.p: C = None
        self.r: G = None
        self.x: C = None
        self.txt = txt

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

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