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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

j = A("j")
n = B("n")
f = C("f")
l = D("l")
c = E("c")
m = F("m")
h = G("h")
i = H("i")
k = C("k")

j.s = n
n.w = j
n.y = i
n.r = k
f.u = h
f.p = h
f.t = i
f.w = n
f.o = k
f.v = j
l.q = c
c.w = i
m.t = f
h.w = i
h.z = n
i.p = l
i.w = m
i.v = m
k.u = h
k.p = h
k.t = i
k.w = n
k.o = f
k.v = j
assert f.v.s.r.w.y.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

j = A("j")
n = B("n")
f = C("f")
l = D("l")
c = E("c")
m = F("m")
h = G("h")
i = H("i")
k = C("k")

j.s = n
n.w = j
n.y = i
n.r = k
f.u = h
f.p = h
f.t = i
f.w = n
f.o = k
f.v = j
l.q = c
c.w = i
m.t = f
h.w = i
h.z = n
i.p = l
i.w = m
i.v = m
k.u = h
k.p = h
k.t = i
k.w = n
k.o = f
k.v = j
assert f.v.s.r.w.y.w.t.txt == "f"