class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: C = None
        self.s: I = None
        self.u: J = None
        self.x: J = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: I = None
        self.z: G = None
        self.q: G = None
        self.u: J = None
        self.r: H = None
        self.o: G = None
        self.t: A = None
        self.y: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: I = None
        self.t: F = None
        self.x: F = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.t: D = None
        self.r: I = None
        self.q: A = None
        self.o: H = None
        self.v: C = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: I = None
        self.z: G = None
        self.q: G = None
        self.u: J = None
        self.r: H = None
        self.o: G = None
        self.t: A = None
        self.y: H = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: I = None
        self.t: F = None
        self.x: F = None
        self.r: F = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.t: D = None
        self.r: I = None
        self.q: A = None
        self.o: H = None
        self.v: C = None
        self.z: C = None
        self.w: F = None
        self.txt = txt

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

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