class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.p: A = None
        self.r: D = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: A = None
        self.p: A = None
        self.r: D = None
        self.w: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

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