class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: I = None
        self.r: J = None
        self.q: F = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.s: J = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.z: G = None
        self.x: C = None
        self.s: E = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: I = None
        self.r: J = None
        self.q: F = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.s: J = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.y: C = None
        self.o: C = None
        self.z: G = None
        self.x: C = None
        self.s: E = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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