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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.p: I = None
        self.txt = txt

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

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

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

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