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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.u: G = None
        self.y: G = None
        self.o: D = None
        self.r: I = None
        self.t: E = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.x: A = None
        self.r: C = None
        self.v: E = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.u: G = None
        self.y: G = None
        self.o: D = None
        self.r: I = None
        self.t: E = None
        self.s: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: A = None
        self.x: A = None
        self.r: C = None
        self.v: E = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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