class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: I = None
        self.r: F = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.z: H = None
        self.o: I = None
        self.v: G = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: C = None
        self.z: E = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.z: H = None
        self.o: I = None
        self.v: G = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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