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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.s: I = None
        self.q: B = None
        self.p: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.s: I = None
        self.q: B = None
        self.p: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

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

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

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

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