class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: E = None
        self.r: F = None
        self.o: C = None
        self.u: C = None
        self.y: F = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: H = None
        self.s: I = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: F = None
        self.x: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.u: F = None
        self.t: A = None
        self.v: F = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: E = None
        self.t: F = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: H = None
        self.s: I = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: F = None
        self.x: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: G = None
        self.u: F = None
        self.t: A = None
        self.v: F = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: I = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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