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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: E = None
        self.t: B = None
        self.o: J = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: I = None
        self.y: A = None
        self.z: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.p: D = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: E = None
        self.t: B = None
        self.o: J = None
        self.w: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: I = None
        self.y: A = None
        self.z: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: C = None
        self.r: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.p: D = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

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

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