class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.x: D = None
        self.q: D = None
        self.t: C = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: I = None
        self.s: D = None
        self.t: I = None
        self.y: G = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.w: H = None
        self.t: F = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.t: C = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

h = A("h")
i = B("i")
k = C("k")
d = D("d")
a = E("a")
g = F("g")
l = G("l")
j = H("j")
m = I("m")
n = B("n")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: I = None
        self.s: D = None
        self.t: I = None
        self.y: G = None
        self.v: F = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.w: H = None
        self.t: F = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.v: H = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.t: C = None
        self.v: D = None
        self.w: H = None
        self.txt = txt

h = A("h")
i = B("i")
k = C("k")
d = D("d")
a = E("a")
g = F("g")
l = G("l")
j = H("j")
m = I("m")
n = B("n")

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