class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.o: B = None
        self.q: B = None
        self.w: A = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.o: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

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

h.w = g
h.o = b
h.x = c
e.o = f
e.p = g
e.u = n
g.y = h
c.s = k
c.p = m
c.y = n
f.x = d
f.v = h
f.w = h
f.o = e
f.q = e
f.t = b
f.u = b
m.v = n
m.u = e
m.o = e
m.x = d
n.q = d
n.y = m
b.u = f
d.q = e
d.t = m
d.v = m
d.p = f
k.s = c
k.p = m
k.y = n
assert m.x.p.v.o.u.q.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: A = None
        self.o: B = None
        self.q: B = None
        self.w: A = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: B = None
        self.o: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

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

h.w = g
h.o = b
h.x = c
e.o = f
e.p = g
e.u = n
g.y = h
c.s = k
c.p = m
c.y = n
f.x = d
f.v = h
f.w = h
f.o = e
f.q = e
f.t = b
f.u = b
m.v = n
m.u = e
m.o = e
m.x = d
n.q = d
n.y = m
b.u = f
d.q = e
d.t = m
d.v = m
d.p = f
k.s = c
k.p = m
k.y = n
assert m.x.p.v.o.u.q.u.q.txt == "d"