class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: H = None
        self.y: B = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.t: I = None
        self.s: E = None
        self.x: E = None
        self.y: G = None
        self.z: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: G = None
        self.q: A = None
        self.u: D = None
        self.v: D = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.r: B = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.t: I = None
        self.s: E = None
        self.x: E = None
        self.y: G = None
        self.z: I = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: G = None
        self.q: A = None
        self.u: D = None
        self.v: D = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.r: B = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

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