class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: H = None
        self.x: B = None
        self.q: H = None
        self.r: B = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.z: B = None
        self.y: H = None
        self.q: A = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: F = None
        self.v: B = None
        self.s: D = None
        self.p: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.z: B = None
        self.y: H = None
        self.q: A = None
        self.x: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.y: C = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: D = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: F = None
        self.v: B = None
        self.s: D = None
        self.p: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

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

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