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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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