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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: E = None
        self.p: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.v: B = None
        self.p: G = None
        self.t: J = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.u: C = None
        self.p: H = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.y: E = None
        self.p: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.v: B = None
        self.p: G = None
        self.t: J = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.u: C = None
        self.p: H = None
        self.v: A = None
        self.txt = txt

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

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

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