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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.s: F = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.p: A = None
        self.q: B = None
        self.u: B = None
        self.v: B = None
        self.s: G = None
        self.r: J = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.v: F = None
        self.y: G = None
        self.t: C = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: J = None
        self.z: F = None
        self.o: B = None
        self.u: B = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.o: A = None
        self.s: F = None
        self.p: I = None
        self.r: C = None
        self.q: C = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.s: F = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.p: A = None
        self.q: B = None
        self.u: B = None
        self.v: B = None
        self.s: G = None
        self.r: J = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.v: F = None
        self.y: G = None
        self.t: C = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: J = None
        self.z: F = None
        self.o: B = None
        self.u: B = None
        self.t: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.o: A = None
        self.s: F = None
        self.p: I = None
        self.r: C = None
        self.q: C = None
        self.u: A = None
        self.txt = txt

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

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