class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.p: C = None
        self.y: H = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.p: C = None
        self.y: H = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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