class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: D = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.z: B = None
        self.t: B = None
        self.v: B = None
        self.u: B = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.y: D = None
        self.p: D = None
        self.v: H = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
b = C("b")
e = D("e")
j = E("j")
a = F("a")
g = G("g")
h = H("h")
l = B("l")
m = C("m")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.z: B = None
        self.t: B = None
        self.v: B = None
        self.u: B = None
        self.o: E = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.y: D = None
        self.p: D = None
        self.v: H = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
b = C("b")
e = D("e")
j = E("j")
a = F("a")
g = G("g")
h = H("h")
l = B("l")
m = C("m")

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