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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.y: G = None
        self.r: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.u: D = None
        self.r: D = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.y: G = None
        self.r: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.u: D = None
        self.r: D = None
        self.x: B = None
        self.o: B = None
        self.txt = txt

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

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

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