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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.r: H = None
        self.q: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: B = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.w: B = None
        self.q: G = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.r: H = None
        self.q: A = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: B = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: H = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: C = None
        self.w: B = None
        self.q: G = None
        self.x: H = None
        self.txt = txt

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

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