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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: G = None
        self.s: A = None
        self.x: G = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.r: D = None
        self.s: B = None
        self.p: A = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: G = None
        self.s: A = None
        self.x: G = None
        self.t: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: D = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: H = None
        self.r: D = None
        self.s: B = None
        self.p: A = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

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

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