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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.w: A = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.y: H = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.p: A = None
        self.o: F = None
        self.w: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.z: E = None
        self.r: G = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: I = None
        self.s: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: C = None
        self.x: C = None
        self.o: H = None
        self.r: F = None
        self.txt = txt

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

l.w = d
l.p = c
e.r = c
e.y = l
e.w = l
e.s = m
e.o = i
i.u = n
i.s = n
i.o = l
i.y = j
i.z = j
n.v = m
n.r = d
d.r = i
d.s = m
d.v = m
d.p = l
d.o = c
d.w = j
c.u = d
c.z = d
c.q = n
c.r = k
c.o = j
c.v = i
k.p = d
k.w = d
k.q = m
j.r = d
j.x = m
j.s = k
j.z = k
m.s = n
m.y = i
m.x = i
m.o = j
m.r = c
assert n.r.s.s.v.y.s.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.w: A = None
        self.s: I = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.y: H = None
        self.s: D = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.p: A = None
        self.o: F = None
        self.w: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.z: E = None
        self.r: G = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: I = None
        self.s: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: C = None
        self.x: C = None
        self.o: H = None
        self.r: F = None
        self.txt = txt

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

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