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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: G = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

b.v = k
b.t = k
b.r = i
b.x = g
b.p = f
b.u = a
i.o = f
i.p = f
i.y = k
i.t = b
m.t = i
k.u = m
k.z = i
h.s = m
g.o = m
g.z = f
g.w = k
f.v = k
f.o = b
f.w = h
f.r = a
f.x = g
f.t = g
f.s = m
a.s = e
a.y = f
e.y = f
assert g.o.t.y.u.t.o.o.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: B = None
        self.x: F = None
        self.t: D = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: G = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: G = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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