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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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