class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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