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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: I = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: I = None
        self.u: E = None
        self.q: D = None
        self.t: A = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.w: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: I = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: I = None
        self.u: E = None
        self.q: D = None
        self.t: A = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: C = None
        self.w: G = None
        self.v: D = None
        self.txt = txt

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

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

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

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