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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: I = None
        self.r: B = None
        self.v: E = None
        self.t: C = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: E = None
        self.s: G = None
        self.w: B = None
        self.v: E = None
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: I = None
        self.r: B = None
        self.v: E = None
        self.t: C = None
        self.s: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: E = None
        self.s: G = None
        self.w: B = None
        self.v: E = None
        self.z: B = None
        self.txt = txt

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

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

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