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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.o: A = None
        self.z: G = None
        self.u: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.s: D = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.o: A = None
        self.z: G = None
        self.u: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.s: D = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

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