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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.s: F = None
        self.q: C = None
        self.z: C = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.s: C = None
        self.z: A = None
        self.q: A = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

k = A("k")
m = B("m")
a = C("a")
b = D("b")
c = E("c")
j = F("j")
g = G("g")
d = B("d")
h = G("h")
n = C("n")

k.o = m
k.v = b
m.r = a
m.z = c
m.w = d
a.p = b
a.v = c
a.s = j
a.w = j
a.q = n
a.z = n
a.x = n
b.r = d
c.q = n
j.z = d
j.x = d
j.q = n
j.s = k
j.p = k
j.v = c
j.u = m
g.o = b
g.v = b
g.s = a
g.z = k
g.q = k
g.x = m
g.y = j
d.r = a
d.z = c
d.w = m
h.o = b
h.v = b
h.s = a
h.z = k
h.q = k
h.x = m
h.y = j
n.p = b
n.v = c
n.s = j
n.w = j
n.q = a
n.z = a
n.x = a
assert d.z.q.w.u.w.w.z.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.s: F = None
        self.q: C = None
        self.z: C = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.s: C = None
        self.z: A = None
        self.q: A = None
        self.x: B = None
        self.y: F = None
        self.txt = txt

k = A("k")
m = B("m")
a = C("a")
b = D("b")
c = E("c")
j = F("j")
g = G("g")
d = B("d")
h = G("h")
n = C("n")

k.o = m
k.v = b
m.r = a
m.z = c
m.w = d
a.p = b
a.v = c
a.s = j
a.w = j
a.q = n
a.z = n
a.x = n
b.r = d
c.q = n
j.z = d
j.x = d
j.q = n
j.s = k
j.p = k
j.v = c
j.u = m
g.o = b
g.v = b
g.s = a
g.z = k
g.q = k
g.x = m
g.y = j
d.r = a
d.z = c
d.w = m
h.o = b
h.v = b
h.s = a
h.z = k
h.q = k
h.x = m
h.y = j
n.p = b
n.v = c
n.s = j
n.w = j
n.q = a
n.z = a
n.x = a
assert d.z.q.w.u.w.w.z.q.s.txt == "j"