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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.z: A = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: F = None
        self.o: G = None
        self.q: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: G = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.z: A = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: F = None
        self.o: G = None
        self.q: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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