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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: G = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: G = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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