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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.r: D = None
        self.z: E = None
        self.x: D = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.r: D = None
        self.z: E = None
        self.x: D = None
        self.o: E = None
        self.txt = txt

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

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