class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: C = None
        self.o: E = None
        self.t: F = None
        self.u: H = None
        self.w: E = None
        self.z: B = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: J = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.o: D = None
        self.p: C = None
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: A = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: J = None
        self.w: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: H = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.o: D = None
        self.p: C = None
        self.z: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: A = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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