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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: G = None
        self.o: F = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.z: C = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
k = C("k")
i = D("i")
b = E("b")
f = F("f")
g = G("g")
l = G("l")
n = A("n")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: G = None
        self.o: F = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: D = None
        self.z: C = None
        self.o: D = None
        self.u: F = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
k = C("k")
i = D("i")
b = E("b")
f = F("f")
g = G("g")
l = G("l")
n = A("n")

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