class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: D = None
        self.w: D = None
        self.t: G = None
        self.s: D = None
        self.y: E = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: I = None
        self.q: B = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.y: H = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: D = None
        self.w: D = None
        self.t: G = None
        self.s: D = None
        self.y: E = None
        self.x: H = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: I = None
        self.q: B = None
        self.o: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.y: H = None
        self.s: B = None
        self.p: A = None
        self.txt = txt

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

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