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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

m = A("m")
i = B("i")
b = C("b")
c = D("c")
k = E("k")
d = F("d")
l = G("l")
a = F("a")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

m = A("m")
i = B("i")
b = C("b")
c = D("c")
k = E("k")
d = F("d")
l = G("l")
a = F("a")

m.x = k
m.u = a
i.y = b
i.t = c
i.s = c
i.w = k
b.z = a
b.v = d
b.s = m
b.y = l
b.t = k
b.u = i
b.x = c
c.r = k
c.v = b
c.y = i
k.s = m
k.t = i
k.r = i
k.v = b
k.u = b
d.z = a
d.s = a
d.p = i
d.r = i
d.v = l
d.x = k
d.t = c
l.x = i
a.z = d
a.s = d
a.p = i
a.r = i
a.v = l
a.x = k
a.t = c
assert m.x.s.x.v.u.s.y.txt == "i"