class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: D = None
        self.z: C = None
        self.v: G = None
        self.s: I = None
        self.x: H = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: H = None
        self.u: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.txt = txt

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

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