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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.t: H = None
        self.o: D = None
        self.y: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: E = None
        self.t: H = None
        self.o: D = None
        self.y: F = None
        self.txt = txt

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

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