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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.x: E = None
        self.z: B = None
        self.p: G = None
        self.t: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.x: E = None
        self.z: B = None
        self.p: G = None
        self.t: B = None
        self.u: B = None
        self.txt = txt

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

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

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