class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: J = None
        self.w: F = None
        self.p: C = None
        self.u: F = None
        self.r: I = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.s: B = None
        self.y: G = None
        self.r: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.u: B = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.v: I = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: I = None
        self.t: C = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: H = None
        self.t: J = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: J = None
        self.w: F = None
        self.p: C = None
        self.u: F = None
        self.r: I = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.s: B = None
        self.y: G = None
        self.r: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.u: B = None
        self.o: I = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: I = None
        self.v: I = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: I = None
        self.t: C = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: H = None
        self.t: J = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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