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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.v: A = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.w: A = None
        self.y: I = None
        self.txt = txt

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

l.x = i
l.w = m
h.w = i
h.r = m
h.z = k
e.y = d
e.x = k
e.w = l
i.r = l
i.y = k
i.q = d
k.r = m
k.s = h
a.y = i
a.x = g
a.v = l
a.r = m
a.t = f
f.w = h
f.y = a
m.o = i
m.q = h
m.p = d
g.s = a
d.r = g
d.y = g
d.v = a
d.w = l
assert h.w.y.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: I = None
        self.v: A = None
        self.r: H = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: F = None
        self.w: A = None
        self.y: I = None
        self.txt = txt

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

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