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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.u: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: C = None
        self.y: E = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.w: G = None
        self.p: D = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.v: J = None
        self.s: B = None
        self.p: C = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: D = None
        self.q: C = None
        self.u: B = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.w: D = None
        self.v: G = None
        self.s: A = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.u: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: C = None
        self.y: E = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: I = None
        self.w: G = None
        self.p: D = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: B = None
        self.v: J = None
        self.s: B = None
        self.p: C = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: D = None
        self.q: C = None
        self.u: B = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.w: D = None
        self.v: G = None
        self.s: A = None
        self.r: H = None
        self.txt = txt

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

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