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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: F = None
        self.w: D = None
        self.z: A = None
        self.txt = txt

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

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