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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.v: C = None
        self.r: B = None
        self.x: G = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

c.t = k
c.z = g
c.o = g
c.w = g
e.o = i
e.t = l
e.z = l
e.s = c
e.r = c
e.w = j
e.v = k
g.r = k
m.r = c
k.p = g
k.w = g
k.x = n
k.t = e
l.z = c
l.w = k
l.v = g
l.r = e
l.x = h
l.t = i
h.x = m
h.t = l
i.z = c
i.w = k
i.v = g
i.r = e
i.x = j
i.t = l
j.x = m
j.t = i
n.r = c
assert m.r.w.r.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.v: C = None
        self.r: B = None
        self.x: G = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.txt = txt

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

c.t = k
c.z = g
c.o = g
c.w = g
e.o = i
e.t = l
e.z = l
e.s = c
e.r = c
e.w = j
e.v = k
g.r = k
m.r = c
k.p = g
k.w = g
k.x = n
k.t = e
l.z = c
l.w = k
l.v = g
l.r = e
l.x = h
l.t = i
h.x = m
h.t = l
i.z = c
i.w = k
i.v = g
i.r = e
i.x = j
i.t = l
j.x = m
j.t = i
n.r = c
assert m.r.w.r.x.r.txt == "c"