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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.o: E = None
        self.v: C = None
        self.u: J = None
        self.z: G = None
        self.w: A = None
        self.x: I = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.p: D = None
        self.y: D = None
        self.v: J = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.w: J = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.y: B = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.o: E = None
        self.v: C = None
        self.u: J = None
        self.z: G = None
        self.w: A = None
        self.x: I = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: B = None
        self.p: D = None
        self.y: D = None
        self.v: J = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: H = None
        self.w: J = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.y: B = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.p: A = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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