class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: D = None
        self.w: D = None
        self.p: E = None
        self.v: F = None
        self.r: H = None
        self.y: B = None
        self.t: E = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.z: I = None
        self.s: J = None
        self.w: J = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: F = None
        self.z: I = None
        self.s: J = None
        self.w: J = None
        self.y: D = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: B = None
        self.txt = txt

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

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