class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: H = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.s: A = None
        self.x: G = None
        self.u: C = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: E = None
        self.r: B = None
        self.u: A = None
        self.o: C = None
        self.s: F = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

j = A("j")
b = B("b")
h = C("h")
a = D("a")
g = E("g")
d = F("d")
i = G("i")
f = H("f")
k = C("k")

j.q = f
j.p = i
b.w = i
b.s = f
b.v = a
b.p = g
h.v = a
h.z = g
h.x = b
h.t = k
h.p = d
a.p = b
a.t = d
a.s = j
a.x = i
a.u = k
a.v = f
a.q = g
g.t = i
d.u = b
i.q = b
i.r = g
f.x = i
f.z = g
f.q = g
f.r = b
f.p = b
f.u = j
f.o = k
f.s = d
k.v = a
k.z = g
k.x = b
k.t = h
k.p = d
assert h.p.u.s.s.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: H = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: F = None
        self.s: A = None
        self.x: G = None
        self.u: C = None
        self.v: H = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: E = None
        self.r: B = None
        self.u: A = None
        self.o: C = None
        self.s: F = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

j = A("j")
b = B("b")
h = C("h")
a = D("a")
g = E("g")
d = F("d")
i = G("i")
f = H("f")
k = C("k")

j.q = f
j.p = i
b.w = i
b.s = f
b.v = a
b.p = g
h.v = a
h.z = g
h.x = b
h.t = k
h.p = d
a.p = b
a.t = d
a.s = j
a.x = i
a.u = k
a.v = f
a.q = g
g.t = i
d.u = b
i.q = b
i.r = g
f.x = i
f.z = g
f.q = g
f.r = b
f.p = b
f.u = j
f.o = k
f.s = d
k.v = a
k.z = g
k.x = b
k.t = h
k.p = d
assert h.p.u.s.s.u.s.txt == "f"