class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.o: D = None
        self.u: F = None
        self.x: D = None
        self.q: F = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.u: C = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: C = None
        self.z: G = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.u: C = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

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

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