class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: D = None
        self.p: H = None
        self.s: H = None
        self.t: B = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.x: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.x: F = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.y: H = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: E = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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

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