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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.w: E = None
        self.s: A = None
        self.z: I = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.p: E = None
        self.u: D = None
        self.w: H = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.y: A = None
        self.u: H = None
        self.r: C = None
        self.p: G = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.w: E = None
        self.s: A = None
        self.z: I = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: E = None
        self.p: E = None
        self.u: D = None
        self.w: H = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.y: A = None
        self.u: H = None
        self.r: C = None
        self.p: G = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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