class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: H = None
        self.z: I = None
        self.q: H = None
        self.t: E = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: F = None
        self.u: D = None
        self.s: C = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: H = None
        self.t: H = None
        self.q: H = None
        self.y: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.z: J = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.z: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: F = None
        self.u: D = None
        self.s: C = None
        self.q: H = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: H = None
        self.t: H = None
        self.q: H = None
        self.y: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.z: J = None
        self.r: B = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.r: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: H = None
        self.z: G = None
        self.txt = txt

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

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