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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.w: G = None
        self.z: H = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: F = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.w: G = None
        self.z: H = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

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

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