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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.y: F = None
        self.x: B = None
        self.r: A = None
        self.v: H = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.q: J = None
        self.p: F = None
        self.y: E = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: C = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: C = None
        self.x: D = None
        self.z: H = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: I = None
        self.y: F = None
        self.x: B = None
        self.r: A = None
        self.v: H = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: I = None
        self.q: J = None
        self.p: F = None
        self.y: E = None
        self.t: H = None
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.w: C = None
        self.z: E = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: H = None
        self.o: C = None
        self.x: D = None
        self.z: H = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

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

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