class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.y: H = None
        self.t: B = None
        self.s: J = None
        self.w: B = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.w: B = None
        self.p: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.x: F = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.s: D = None
        self.v: C = None
        self.r: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: D = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.y: H = None
        self.t: B = None
        self.s: J = None
        self.w: B = None
        self.p: H = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.w: B = None
        self.p: D = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: F = None
        self.x: F = None
        self.y: B = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.s: D = None
        self.v: C = None
        self.r: A = None
        self.x: J = None
        self.txt = txt

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

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

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