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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.s: A = None
        self.r: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.p: I = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.s: A = None
        self.r: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.p: I = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

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

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

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