class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.t: C = None
        self.y: E = None
        self.q: F = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.x: C = None
        self.p: G = None
        self.w: A = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

d.r = k
d.s = j
d.w = f
a.v = m
a.p = j
a.o = d
a.s = l
m.q = j
m.w = j
m.o = h
l.o = a
l.r = m
l.t = m
l.x = m
l.y = h
l.s = h
l.q = f
h.o = j
h.p = j
h.y = j
h.s = j
h.z = m
h.x = m
h.w = d
f.o = j
j.t = f
j.o = f
j.x = f
k.o = a
k.q = d
k.p = m
k.r = f
assert a.v.w.x.o.o.o.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.t: C = None
        self.y: E = None
        self.q: F = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.x: C = None
        self.p: G = None
        self.w: A = None
        self.y: G = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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