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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.q: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

a = A("a")
j = B("j")
e = C("e")
d = D("d")
g = E("g")
i = F("i")
l = G("l")
m = H("m")
k = A("k")
f = A("f")

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.q: G = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: F = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

a = A("a")
j = B("j")
e = C("e")
d = D("d")
g = E("g")
i = F("i")
l = G("l")
m = H("m")
k = A("k")
f = A("f")

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