class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: I = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.z: C = None
        self.u: A = None
        self.p: A = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: B = None
        self.x: G = None
        self.q: C = None
        self.s: G = None
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.z: C = None
        self.u: A = None
        self.p: A = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: B = None
        self.x: G = None
        self.q: C = None
        self.s: G = None
        self.y: A = None
        self.r: G = None
        self.txt = txt

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

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