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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: A = None
        self.w: F = None
        self.v: E = None
        self.s: E = None
        self.p: A = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: E = None
        self.w: D = None
        self.u: F = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: J = None
        self.t: F = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.s: B = None
        self.p: I = None
        self.t: B = None
        self.txt = txt

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

k.o = f
k.u = n
k.y = l
k.x = j
k.w = e
k.q = i
k.r = a
d.o = f
d.u = l
a.u = f
a.s = l
a.x = l
b.q = i
b.y = k
b.p = k
b.w = f
b.v = j
b.s = j
b.x = e
j.y = b
f.t = e
n.x = k
n.v = k
n.q = j
n.w = b
n.o = b
n.u = f
e.w = j
l.x = k
l.q = i
l.t = f
l.r = n
l.o = d
i.y = d
i.s = d
i.t = d
i.u = f
i.p = l
assert i.s.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.y: I = None
        self.x: E = None
        self.w: H = None
        self.q: J = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: A = None
        self.w: F = None
        self.v: E = None
        self.s: E = None
        self.p: A = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: E = None
        self.w: D = None
        self.u: F = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: J = None
        self.t: F = None
        self.r: G = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.s: B = None
        self.p: I = None
        self.t: B = None
        self.txt = txt

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

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