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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.x: F = None
        self.q: G = None
        self.v: B = None
        self.p: F = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: C = None
        self.r: H = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: B = None
        self.x: F = None
        self.q: G = None
        self.v: B = None
        self.p: F = None
        self.u: A = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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