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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.r: G = None
        self.v: B = None
        self.o: D = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: A = None
        self.z: F = None
        self.s: E = None
        self.y: B = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.s: G = None
        self.z: B = None
        self.v: G = None
        self.w: C = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: D = None
        self.r: G = None
        self.v: B = None
        self.o: D = None
        self.s: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: A = None
        self.z: F = None
        self.s: E = None
        self.y: B = None
        self.u: F = None
        self.w: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.s: G = None
        self.z: B = None
        self.v: G = None
        self.w: C = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

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

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