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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.v: D = None
        self.o: G = None
        self.q: D = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: G = None
        self.r: A = None
        self.q: A = None
        self.x: J = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: J = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.o: C = None
        self.z: D = None
        self.s: J = None
        self.y: C = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: H = None
        self.v: D = None
        self.o: G = None
        self.q: D = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: G = None
        self.r: A = None
        self.q: A = None
        self.x: J = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: J = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: H = None
        self.o: C = None
        self.z: D = None
        self.s: J = None
        self.y: C = None
        self.p: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

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