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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.u: I = None
        self.v: F = None
        self.r: E = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.y: A = None
        self.z: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: H = None
        self.u: I = None
        self.v: F = None
        self.r: E = None
        self.s: H = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: C = None
        self.y: A = None
        self.z: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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