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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: D = None
        self.u: H = None
        self.v: F = None
        self.x: I = None
        self.y: D = None
        self.r: A = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.p: I = None
        self.x: I = None
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: D = None
        self.u: H = None
        self.v: F = None
        self.x: I = None
        self.y: D = None
        self.r: A = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: B = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.p: I = None
        self.x: I = None
        self.s: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

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

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