class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: C = None
        self.s: E = None
        self.x: E = None
        self.u: E = None
        self.v: H = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.t: H = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

h.w = a
h.v = a
h.o = a
h.t = i
h.s = n
h.x = n
h.u = n
h.r = n
l.w = f
l.y = j
i.v = e
i.z = c
i.t = a
i.r = a
e.r = f
e.o = l
n.u = a
j.t = i
j.o = f
c.z = j
c.y = j
c.q = h
a.t = e
f.w = a
f.v = a
f.o = a
f.t = i
f.s = n
f.x = n
f.u = n
f.r = n
assert h.u.u.t.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: C = None
        self.s: E = None
        self.x: E = None
        self.u: E = None
        self.v: H = None
        self.r: E = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: G = None
        self.t: H = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

h.w = a
h.v = a
h.o = a
h.t = i
h.s = n
h.x = n
h.u = n
h.r = n
l.w = f
l.y = j
i.v = e
i.z = c
i.t = a
i.r = a
e.r = f
e.o = l
n.u = a
j.t = i
j.o = f
c.z = j
c.y = j
c.q = h
a.t = e
f.w = a
f.v = a
f.o = a
f.t = i
f.s = n
f.x = n
f.u = n
f.r = n
assert h.u.u.t.o.w.txt == "f"