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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.v: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.p: C = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.t: A = None
        self.s: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.x: B = None
        self.t: D = None
        self.o: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.v: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: F = None
        self.p: C = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.t: A = None
        self.s: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: G = None
        self.x: B = None
        self.t: D = None
        self.o: G = None
        self.txt = txt

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

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

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