class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.t: H = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: H = None
        self.t: H = None
        self.u: D = None
        self.v: A = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: D = None
        self.q: H = None
        self.s: D = None
        self.y: E = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: H = None
        self.t: H = None
        self.u: D = None
        self.v: A = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: D = None
        self.q: H = None
        self.s: D = None
        self.y: E = None
        self.o: I = None
        self.u: I = None
        self.txt = txt

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

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

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

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