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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.v: E = None
        self.w: D = None
        self.r: F = None
        self.q: F = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.v: E = None
        self.w: D = None
        self.r: F = None
        self.q: F = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

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

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