class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: H = None
        self.x: B = None
        self.r: H = None
        self.s: C = None
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: I = None
        self.t: G = None
        self.v: I = None
        self.s: B = None
        self.w: F = None
        self.z: G = None
        self.u: D = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: H = None
        self.x: B = None
        self.r: H = None
        self.s: C = None
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: F = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: I = None
        self.t: G = None
        self.v: I = None
        self.s: B = None
        self.w: F = None
        self.z: G = None
        self.u: D = None
        self.y: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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