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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: A = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.p: C = None
        self.q: H = None
        self.x: A = None
        self.v: H = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.u: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.v: E = None
        self.s: G = None
        self.r: C = None
        self.y: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
b = D("b")
h = E("h")
l = F("l")
g = G("g")
k = H("k")
d = E("d")
f = C("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: A = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.p: C = None
        self.q: H = None
        self.x: A = None
        self.v: H = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.u: H = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.v: E = None
        self.s: G = None
        self.r: C = None
        self.y: C = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

n = A("n")
i = B("i")
j = C("j")
b = D("b")
h = E("h")
l = F("l")
g = G("g")
k = H("k")
d = E("d")
f = C("f")

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