class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.z: F = None
        self.x: E = None
        self.u: H = None
        self.r: B = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.t: H = None
        self.x: D = None
        self.v: H = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.t: H = None
        self.x: D = None
        self.v: H = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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

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