class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.v: G = None
        self.y: E = None
        self.z: E = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.z: G = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: C = None
        self.y: G = None
        self.s: G = None
        self.t: G = None
        self.o: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: B = None
        self.v: G = None
        self.y: E = None
        self.z: E = None
        self.o: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.z: G = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: C = None
        self.y: G = None
        self.s: G = None
        self.t: G = None
        self.o: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

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

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