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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.v: G = None
        self.r: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: I = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.v: H = None
        self.u: C = None
        self.s: I = None
        self.q: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.v: G = None
        self.r: F = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: I = None
        self.v: I = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: B = None
        self.v: H = None
        self.u: C = None
        self.s: I = None
        self.q: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

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

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

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