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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: A = None
        self.p: E = None
        self.q: I = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

d = A("d")
e = B("e")
i = C("i")
b = D("b")
g = E("g")
l = F("l")
a = G("a")
m = H("m")
n = I("n")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: B = None
        self.s: G = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: A = None
        self.p: E = None
        self.q: I = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

d = A("d")
e = B("e")
i = C("i")
b = D("b")
g = E("g")
l = F("l")
a = G("a")
m = H("m")
n = I("n")

d.u = g
d.w = e
d.s = n
d.o = i
d.r = b
d.y = l
e.o = i
e.y = i
e.z = i
e.u = g
e.w = n
e.v = n
e.q = n
e.s = m
e.t = a
i.v = b
i.x = n
b.s = m
b.w = d
b.u = i
b.y = i
b.r = i
b.z = g
b.t = l
g.u = m
g.x = i
l.r = g
l.p = e
l.s = a
l.t = d
a.s = m
m.u = n
m.q = n
m.t = d
m.p = g
m.z = a
n.s = m
assert i.v.r.v.r.txt == "i"