class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: D = None
        self.s: D = None
        self.v: C = None
        self.p: G = None
        self.y: C = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.t: G = None
        self.s: I = None
        self.y: I = None
        self.v: I = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.v: E = None
        self.z: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: F = None
        self.t: G = None
        self.s: I = None
        self.y: I = None
        self.v: I = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.v: E = None
        self.z: F = None
        self.q: E = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: E = None
        self.y: B = None
        self.txt = txt

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

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