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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.z: D = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.z: D = None
        self.t: A = None
        self.x: E = None
        self.txt = txt

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

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

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