class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: F = None
        self.o: E = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.t: F = None
        self.x: F = None
        self.y: C = None
        self.o: H = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.t: G = None
        self.u: H = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

m = A("m")
c = B("c")
n = C("n")
i = D("i")
f = E("f")
d = F("d")
e = G("e")
h = H("h")
l = H("l")
j = A("j")

m.q = c
m.x = n
m.w = d
m.o = f
m.t = f
m.u = j
c.z = f
c.s = f
c.t = d
c.x = d
c.y = n
c.o = l
c.u = h
c.v = h
n.o = i
i.w = m
f.t = d
f.v = d
f.x = h
d.u = e
d.s = f
d.w = f
e.v = m
e.p = m
e.q = m
h.o = f
h.p = d
h.t = e
h.u = l
h.w = l
h.q = n
l.o = f
l.p = d
l.t = e
l.u = h
l.w = h
l.q = n
j.q = c
j.x = n
j.w = d
j.o = f
j.t = f
j.u = m
assert m.u.q.x.w.v.s.x.o.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.w: F = None
        self.o: E = None
        self.t: E = None
        self.u: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.t: F = None
        self.x: F = None
        self.y: C = None
        self.o: H = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: F = None
        self.t: G = None
        self.u: H = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

m = A("m")
c = B("c")
n = C("n")
i = D("i")
f = E("f")
d = F("d")
e = G("e")
h = H("h")
l = H("l")
j = A("j")

m.q = c
m.x = n
m.w = d
m.o = f
m.t = f
m.u = j
c.z = f
c.s = f
c.t = d
c.x = d
c.y = n
c.o = l
c.u = h
c.v = h
n.o = i
i.w = m
f.t = d
f.v = d
f.x = h
d.u = e
d.s = f
d.w = f
e.v = m
e.p = m
e.q = m
h.o = f
h.p = d
h.t = e
h.u = l
h.w = l
h.q = n
l.o = f
l.p = d
l.t = e
l.u = h
l.w = h
l.q = n
j.q = c
j.x = n
j.w = d
j.o = f
j.t = f
j.u = m
assert m.u.q.x.w.v.s.x.o.v.w.txt == "f"