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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.x: B = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: G = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: E = None
        self.x: B = None
        self.w: A = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

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