class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.s: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.p: F = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.s: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: F = None
        self.p: F = None
        self.y: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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