class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: E = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.s: E = None
        self.y: G = None
        self.o: E = None
        self.w: I = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.s: E = None
        self.t: J = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.o: F = None
        self.u: A = None
        self.v: A = None
        self.z: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: E = None
        self.s: E = None
        self.y: G = None
        self.o: E = None
        self.w: I = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.s: E = None
        self.t: J = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: B = None
        self.o: F = None
        self.u: A = None
        self.v: A = None
        self.z: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.p: F = None
        self.txt = txt

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

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