class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: J = None
        self.p: C = None
        self.w: F = None
        self.o: F = None
        self.q: D = None
        self.u: F = None
        self.s: J = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.x: G = None
        self.w: E = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.v: E = None
        self.z: E = None
        self.y: H = None
        self.t: C = None
        self.q: G = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.x: G = None
        self.w: E = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: H = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: D = None
        self.v: E = None
        self.z: E = None
        self.y: H = None
        self.t: C = None
        self.q: G = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

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

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