class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: E = None
        self.y: E = None
        self.v: F = None
        self.p: G = None
        self.w: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.q: C = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: G = None
        self.t: B = None
        self.w: G = None
        self.y: G = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: D = None
        self.s: I = None
        self.o: E = None
        self.z: F = None
        self.p: C = None
        self.q: D = None
        self.t: E = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.q: C = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: G = None
        self.t: B = None
        self.w: G = None
        self.y: G = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: F = None
        self.s: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: D = None
        self.s: I = None
        self.o: E = None
        self.z: F = None
        self.p: C = None
        self.q: D = None
        self.t: E = None
        self.v: F = None
        self.txt = txt

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

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