class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: B = None
        self.o: D = None
        self.s: C = None
        self.y: E = None
        self.u: D = None
        self.q: H = None
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.x: G = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.t: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.x: G = None
        self.q: E = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: G = None
        self.t: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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