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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.y: D = None
        self.v: B = None
        self.w: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.p: A = None
        self.z: F = None
        self.q: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.s: B = None
        self.txt = txt

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

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

n.t = a
g.u = a
g.r = a
g.o = c
g.y = m
g.v = i
g.w = h
c.z = g
h.x = n
h.w = n
h.p = n
h.z = k
h.t = k
h.q = g
a.w = b
a.v = m
a.s = g
k.x = i
k.o = i
k.w = n
k.q = h
k.v = g
k.p = a
i.u = a
i.r = a
i.o = c
i.y = m
i.v = g
i.w = h
m.x = n
m.w = n
m.p = n
m.z = k
m.t = k
m.q = g
b.z = i
assert m.q.y.w.t.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: C = None
        self.y: D = None
        self.v: B = None
        self.w: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.p: A = None
        self.z: F = None
        self.q: B = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: D = None
        self.s: B = None
        self.txt = txt

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

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

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