class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: F = None
        self.o: B = None
        self.u: H = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.o: H = None
        self.p: A = None
        self.z: A = None
        self.u: D = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.o: H = None
        self.p: A = None
        self.z: A = None
        self.u: D = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: E = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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