class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.p: E = None
        self.w: D = None
        self.x: G = None
        self.q: H = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: H = None
        self.u: H = None
        self.txt = txt

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

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