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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: H = None
        self.w: H = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.p: F = None
        self.s: G = None
        self.x: G = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.s: G = None
        self.t: B = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: I = None
        self.u: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.t: C = None
        self.w: F = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: H = None
        self.w: H = None
        self.u: H = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: J = None
        self.p: F = None
        self.s: G = None
        self.x: G = None
        self.t: G = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: A = None
        self.s: G = None
        self.t: B = None
        self.r: B = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: I = None
        self.u: E = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.t: C = None
        self.w: F = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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