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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: H = None
        self.u: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

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

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

m.w = k
j.q = l
j.u = l
j.p = k
j.y = f
h.w = l
h.u = l
h.o = m
h.y = b
h.t = n
f.v = b
f.u = k
d.v = k
l.w = f
l.r = h
l.s = d
l.o = d
b.u = k
b.r = k
b.w = l
k.p = b
k.t = h
e.v = b
e.u = k
n.q = l
n.u = l
n.p = k
n.y = e
assert h.y.u.t.o.w.t.txt == "h"