class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: E = None
        self.w: H = None
        self.t: C = None
        self.x: C = None
        self.y: G = None
        self.o: F = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.r: A = None
        self.p: H = None
        self.u: I = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.r: A = None
        self.p: H = None
        self.u: I = None
        self.s: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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