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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.x: H = None
        self.p: E = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: G = None
        self.x: H = None
        self.p: E = None
        self.u: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.txt = txt

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

l.t = i
l.q = f
f.u = b
f.x = k
f.w = k
f.z = m
m.s = n
m.x = n
m.q = k
m.p = i
m.u = l
m.t = b
h.z = f
h.x = b
h.s = b
h.p = i
i.y = b
i.s = m
b.x = m
b.u = h
b.s = f
k.o = n
n.z = e
n.o = e
e.s = n
e.x = n
e.q = k
e.p = i
e.u = l
e.t = b
assert i.y.s.u.s.u.u.p.s.q.txt == "k"