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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
i = C("i")
l = D("l")
e = E("e")
d = F("d")
g = G("g")
f = F("f")
c = G("c")

m.s = d
m.x = b
b.s = m
b.u = m
b.z = e
i.u = f
i.t = g
l.z = b
l.w = b
l.t = m
l.r = i
e.u = c
e.z = c
d.y = m
d.p = l
d.t = l
d.x = e
d.s = f
g.u = l
g.r = b
g.s = b
g.o = e
g.v = c
g.t = i
f.y = m
f.p = l
f.t = l
f.x = e
f.s = d
c.u = l
c.r = b
c.s = b
c.o = e
c.v = g
c.t = i
assert e.u.o.z.t.u.x.z.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
i = C("i")
l = D("l")
e = E("e")
d = F("d")
g = G("g")
f = F("f")
c = G("c")

m.s = d
m.x = b
b.s = m
b.u = m
b.z = e
i.u = f
i.t = g
l.z = b
l.w = b
l.t = m
l.r = i
e.u = c
e.z = c
d.y = m
d.p = l
d.t = l
d.x = e
d.s = f
g.u = l
g.r = b
g.s = b
g.o = e
g.v = c
g.t = i
f.y = m
f.p = l
f.t = l
f.x = e
f.s = d
c.u = l
c.r = b
c.s = b
c.o = e
c.v = g
c.t = i
assert e.u.o.z.t.u.x.z.o.z.txt == "c"