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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: A = None
        self.p: A = None
        self.w: D = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.u: E = None
        self.w: B = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.s: G = None
        self.r: D = None
        self.w: A = None
        self.v: D = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

n = A("n")
b = B("b")
i = C("i")
k = D("k")
l = E("l")
a = F("a")
m = G("m")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: A = None
        self.p: A = None
        self.w: D = None
        self.t: D = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.z: G = None
        self.y: F = None
        self.u: E = None
        self.w: B = None
        self.v: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.u: G = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: D = None
        self.s: G = None
        self.r: D = None
        self.w: A = None
        self.v: D = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

n = A("n")
b = B("b")
i = C("i")
k = D("k")
l = E("l")
a = F("a")
m = G("m")
f = H("f")

n.u = b
b.p = f
i.x = m
i.r = n
i.p = n
i.w = k
i.t = k
i.z = k
k.t = i
k.p = a
k.y = a
k.v = a
k.z = m
k.u = l
k.w = b
k.s = f
l.p = i
l.t = f
l.y = k
a.y = k
a.x = n
a.u = m
a.s = b
m.z = b
m.u = f
m.s = f
m.x = f
m.v = n
m.q = n
m.r = a
f.p = a
f.y = a
f.q = a
f.z = k
f.r = k
f.v = k
f.s = m
f.w = n
assert k.u.p.z.t.w.t.z.u.txt == "l"