class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.x: I = None
        self.o: J = None
        self.q: G = None
        self.r: J = None
        self.p: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.u: I = None
        self.r: E = None
        self.v: I = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.r: J = None
        self.x: J = None
        self.p: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.u: I = None
        self.r: E = None
        self.v: I = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.r: J = None
        self.x: J = None
        self.p: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.x: A = None
        self.q: C = None
        self.txt = txt

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

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

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