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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: E = None
        self.z: E = None
        self.p: G = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: A = None
        self.u: E = None
        self.z: E = None
        self.p: G = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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