class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.w: C = None
        self.r: I = None
        self.o: B = None
        self.t: E = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: J = None
        self.z: C = None
        self.y: I = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.y: G = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: H = None
        self.y: J = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: J = None
        self.z: C = None
        self.y: I = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: I = None
        self.y: G = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

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