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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: D = None
        self.z: B = None
        self.t: C = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: B = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: D = None
        self.z: B = None
        self.t: C = None
        self.v: F = None
        self.o: D = None
        self.txt = txt

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

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