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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: H = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: F = None
        self.s: C = None
        self.o: B = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: E = None
        self.o: D = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: E = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: H = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: F = None
        self.s: C = None
        self.o: B = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: E = None
        self.o: D = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.t: A = None
        self.txt = txt

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

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