class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.u: C = None
        self.w: F = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.z: A = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

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

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

c.z = m
c.u = m
c.x = n
g.t = h
g.w = h
g.v = k
g.u = i
g.q = i
g.s = n
i.t = g
m.x = c
m.z = c
m.v = h
m.u = i
m.w = n
k.w = h
k.z = c
k.v = m
k.q = i
h.v = k
h.u = m
h.x = g
h.w = i
n.z = m
n.u = m
n.x = c
assert m.w.x.z.v.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: A = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: E = None
        self.u: C = None
        self.w: F = None
        self.q: C = None
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.z: A = None
        self.u: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

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

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

c.z = m
c.u = m
c.x = n
g.t = h
g.w = h
g.v = k
g.u = i
g.q = i
g.s = n
i.t = g
m.x = c
m.z = c
m.v = h
m.u = i
m.w = n
k.w = h
k.z = c
k.v = m
k.q = i
h.v = k
h.u = m
h.x = g
h.w = i
n.z = m
n.u = m
n.x = c
assert m.w.x.z.v.w.t.txt == "g"