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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.t: D = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.t: D = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

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

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