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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.v: F = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.s: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.q: D = None
        self.x: G = None
        self.y: D = None
        self.z: D = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: E = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.v: F = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.s: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.q: D = None
        self.x: G = None
        self.y: D = None
        self.z: D = None
        self.p: D = None
        self.txt = txt

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

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