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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.y: F = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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