class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.p: E = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

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

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

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