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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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