class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: B = None
        self.z: I = None
        self.o: G = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.z: C = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.z: C = None
        self.x: B = None
        self.u: C = None
        self.txt = txt

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

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

b.t = n
b.w = g
b.s = g
b.z = j
b.o = k
b.x = e
g.s = h
d.w = f
d.z = b
d.o = e
d.s = k
c.s = h
c.r = j
c.z = k
e.t = h
f.v = b
f.z = j
k.x = b
h.w = f
h.o = k
j.y = d
j.z = d
j.u = d
j.s = b
j.x = g
n.v = k
assert d.w.z.x.s.w.v.txt == "b"