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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.z: G = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.u: A = None
        self.o: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: A = None
        self.z: G = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.u: A = None
        self.o: H = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

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