class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: B = None
        self.x: D = None
        self.v: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: A = None
        self.s: B = None
        self.x: D = None
        self.v: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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