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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.w: F = None
        self.p: C = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: F = None
        self.w: F = None
        self.p: C = None
        self.t: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: D = None
        self.o: D = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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