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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: B = None
        self.x: G = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.q: B = None
        self.t: E = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: C = None
        self.z: B = None
        self.x: G = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: C = None
        self.q: B = None
        self.t: E = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

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