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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

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